
588 So.2d 1239 (1991)
STATE of Louisiana
v.
Joe Louis WILLIAMS (Two Cases).
Nos. KA 90 1378, KA 90 1379.
Court of Appeal of Louisiana, First Circuit.
October 18, 1991.
*1240 Bryan Bush, Dist. Atty. Office of the Dist. Atty. by Robert Piedrahita and Dan Grady, Asst. Dist. Attys., Baton Rouge, for plaintiff/appellee.
Office of the Public Defender, Baton Rouge, for defendant/appellant.
Before SHORTESS, LANIER and CRAIN, JJ.
LANIER, Judge.
The defendant, Joe Williams, was charged by bill of information with possession with intent to distribute cocaine, a violation of La.R.S. 40:967(A). He pled not guilty and, after trial by jury, was found guilty of the responsive verdict of attempted possession with intent to distribute cocaine, a violation of La.R.S. 40:967(A) and 979. Subsequently, the State filed a habitual offender bill of information alleging that the defendant was a fourth felony offender. Pursuant to a plea bargain agreement, the defendant stipulated he *1241 was a third felony habitual offender. Thereafter, he was sentenced to sixty years at hard labor. This appeal followed.

FACTS
On June 10, 1987, Baton Rouge City Police officers executed a search warrant for an apartment located at 801 Swan Avenue in Baton Rouge, Louisiana. When the search began, the apartment was unoccupied, and the officers were forced to break in through the front door. Once inside, they observed clothes and personal effects belonging to the defendant. Sergeant Michael Dickinson, the officer in charge, previously had received information that the defendant and a female, Diane Curry, lived in that apartment. During the search, some cocaine was recovered from this apartment. Earlier that evening in a "controlled buy" monitored by Sgt. Dickinson, a confidential informant purchased $40 worth of cocaine at this apartment from Diane Curry. The warrant to search the apartment for cocaine was obtained after this cocaine purchase.
During the search of the apartment, the officers observed the defendant drive into the parking lot in a Cadillac Seville which belonged to Diane Curry. Using a flashlight, Sgt. Dickinson illuminated the interior of the Cadillac and observed a white powder substance inside a plastic bag on the console between the two front seats. He ordered the defendant to unlock the vehicle, and he retrieved nine packages of suspected cocaine. The defendant was arrested. His vehicle was also in the parking lot and was searched, but no cocaine was found. Subsequent scientific analysis of the nine packages seized from the Cadillac revealed that these packages contained cocaine.

VALIDITY OF SEARCH

(Assignment of error 1)
The defendant contends that the trial court erred in denying his motion to suppress the cocaine seized during the search of the Cadillac.
The right of law enforcement officers to stop and interrogate one reasonably suspected of criminal conduct is recognized by Louisiana Code of Criminal Procedure article 215.1, as well as both federal and state jurisprudence. Terry v. Ohio, 392 U.S. 1, 88 S.Ct. 1868, 20 L.Ed.2d 889 (1968); State v. Andrishok, 434 So.2d 389 (La. 1983). Reasonable cause for an investigatory detention is something less than probable cause and must be determined under the facts of each case by whether or not the officer had sufficient knowledge of facts and circumstances to justify an infringement on the individual's right to be free from governmental interference. The right to make an investigatory stop and question the particular individual detained must be based upon reasonable cause to believe that he has been, is, or is about to be engaged in criminal conduct. Andrishok, 434 So.2d at 391.
Information derived from the preliminary examination, motion to suppress hearing, and the trial reveals the following.[1] Sgt. Dickinson had been informed by a confidential informant that the defendant and Diane Curry were selling cocaine from the apartment at 801 Swan Avenue. He arranged a "controlled buy" of cocaine. Diane Curry sold a quantity of cocaine to the confidential informant for $40. After this transaction, Sgt. Dickinson obtained a search warrant for the apartment. When the officers arrived to search the apartment, it was unoccupied. They entered and searched the apartment, finding some cocaine and money, including the two twenty-dollar bills given to Curry by the confidential informant. They also observed the defendant's clothes and personal effects inside the apartment. Curry arrived at the *1242 apartment during the search and was arrested. Thereafter, the defendant drove into the parking lot in Curry's Cadillac. The defendant approached the door of the apartment, turned suddenly, and walked back to the Cadillac. Before he could enter the vehicle, however, he was detained and searched by the police.[2] Given the above information, the police had the right to detain and question the defendant. They had reasonable cause to believe that the defendant and Diane Curry were selling cocaine from the apartment in which the defendant's clothes and personal effects were found during a search executed pursuant to a warrant.
Because the investigatory stop of the defendant was lawful, Sgt. Dickinson's seizure of the cocaine was also lawful because the cocaine was in plain view. Seizures of evidence under the plain view doctrine are permissible when: (1) there is a prior justification for an intrusion into a protected area; (2) the evidence is discovered inadvertently;[3] and (3) it is immediately apparent without close inspection that the items are evidence or contraband. State v. Hernandez, 410 So.2d 1381 (La.1982).
Sgt. Dickinson had the right to detain and question the defendant as he attempted to reenter the Cadillac. Sgt. Dickinson illuminated the vehicle with his flashlight and observed what he believed to be cocaine on the console or floor area between the two front seats. If an officer has lawfully detained a person based upon reasonable cause, and he sees direct evidence of a crime in plain view, based on that evidence he has probable cause for arrest and may seize the evidence in plain view. State v. Beasley, 430 So.2d 1273 (La.App. 1st Cir.1983). Illumination of the vehicle's interior with the flashlight violated no rights of the defendant or Curry. State v. Bracken, 506 So.2d 807 (La.App. 1st Cir.), writ denied, 511 So.2d 1152 (La. 1987). Under these circumstances, the immediate, warrantless seizure of the cocaine observed in the vehicle was constitutionally permissible. Therefore, Sgt. Dickinson was justified in ordering the defendant to unlock the door and in seizing the nine packages of cocaine. The trial court correctly denied the defendant's motion to suppress.
This assignment of error is without merit.

SUFFICIENCY OF THE EVIDENCE

(Assignment of error 2)
The defendant contends the evidence was insufficient to support the conviction.
The standard of review for the sufficiency of the evidence to uphold a conviction is whether or not, viewing the evidence in the light most favorable to the prosecution, a rational trier of fact could conclude that the State proved the essential elements of the crime beyond a reasonable doubt. La.C.Cr.P. art. 821; State v. King, 563 So.2d 449 (La.App. 1st Cir.), writ denied, 567 So.2d 610 (La.1990).
The defendant was convicted of attempted possession with intent to distribute cocaine. Possession may be established by proof of the defendant's actual or constructive possession. State v. Tasker, 448 So.2d 1311 (La.App. 1st Cir.), writ denied, 450 So.2d 644 (La.1984). The intent to distribute may be inferred from the quantity, street value, and dosage units of the drug, and the circumstances of its possession. State v. Staton, 433 So.2d 222 (La.App. 1st Cir.), writ denied, 438 So.2d 1112 (La.1983). The defendant specifically contends the evidence was insufficient to prove he possessed the cocaine, citing State v. Cann, 319 So.2d 396 (La.1975), for the *1243 proposition that mere presence in the area where controlled dangerous substances are found is not sufficient to constitute constructive possession.
At the trial, Sgt. Dickinson testified that the confidential informant had informed him that the defendant and Diane Curry were living in the apartment and that cocaine was being sold from this apartment. After the confidential informant purchased cocaine from Diane Curry in a "controlled buy", Sgt. Dickinson obtained a search warrant for the apartment. During the execution of the search warrant, the defendant's personal effects and clothes were observed. This search also produced a quantity of cocaine. When the defendant was arrested, he had just pulled into the parking lot in Diane Curry's Cadillac Seville. The vehicle had nine plastic bags of cocaine on the console between the front seats. At least some of the cocaine was in plain view and was observed by Sgt. Dickinson from outside the vehicle with the aid of his flashlight. Finally, Sgt. Dickinson testified that this quantity of cocaine was inconsistent with personal use. Considering all of the above facts, we reject the defendant's argument that there was insufficient evidence of constructive possession. There was sufficient evidence of defendant's constructive and actual possession of cocaine.
This assignment of error is without merit.

VALIDITY OF SENTENCE

(Assignment of error 4)[4]
The defendant contends that the trial court erred in imposing an excessive sentence and in failing to comply with the sentencing guidelines of La.C.Cr.P. art. 894.1. Furthermore, in his brief to this Court, the defendant specifically argues that his sentence is illegal in that it exceeds the statutorily authorized maximum for this offense. We agree.
The defendant was convicted of attempted possession with intent to distribute cocaine. Pursuant to La.R.S. 40:967(B)(1) and 979(A), the defendant was exposed to a minimum sentence of two and one-half years at hard labor and a maximum sentence of fifteen years at hard labor, as well as a maximum fine of $7,500. When he was adjudicated a third felony habitual offender, the defendant's sentencing exposure was increased to a minimum of seven and one-half years at hard labor and a maximum of thirty years at hard labor. See La.R.S. 15:529.1(A)(2)(a), prior to its amendment by Acts 1989, No. 482. Therefore, a sentence of sixty years at hard labor exceeds the maximum statutorily authorized penalty for this offense. Accordingly, the sentence is vacated and the case is remanded to the trial court for resentencing.
This assignment of error has merit.

DECREE
For the foregoing reasons, the defendant's conviction is affirmed, the sentence is vacated and the case is remanded to the trial court for resentencing.
CONVICTION AFFIRMED; SENTENCE VACATED; REMANDED FOR RESENTENCING.
NOTES
[1]  The State and the defense stipulated that the testimony from the preliminary examination hearing was introduced into evidence at the motion to suppress hearing. Additionally, in determining whether or not a ruling on a motion to suppress was correct, this Court is not limited to the evidence adduced at the hearing on that motion. Instead, we may consider all pertinent evidence given at the trial of the case. State v. Fleming, 457 So.2d 1232, 1235 n. 3 (La.App. 1st Cir.), writ denied, 462 So.2d 191 (La.1984).
[2]  The defendant has not directly contested his initial pat down search by the police. Nevertheless, we find that the police were justified in making an initial search of the defendant before questioning him. A protective, pat down search of the defendant was reasonable, especially in light of the fact that a gun was found in Curry's purse when she was arrested after she returned to the apartment. See State v. Wade, 390 So.2d 1309 (La.1980); State v. Rodriguez, 476 So.2d 994 (La.App. 1st Cir.1985).
[3]  The inadvertent discovery condition was recently deleted from the plain view doctrine. See Horton v. California, 496 U.S. 128, 110 S.Ct. 2301, 2308 and 2310, 110 L.Ed.2d 112 (1990).
[4]  The defendant, in his brief, abandoned assignments of error 3 and 5.
