
587 So.2d 136 (1991)
STATE of Louisiana, Appellee,
v.
Robert ALONZO, Appellant.
No. 22766-KA.
Court of Appeal of Louisiana, Second Circuit.
September 25, 1991.
On Rehearing October 30, 1991.
*137 Geary S. Aycock, West Monroe, for appellant.
William Guste, Jr., Atty. Gen., Baton Rouge, William R. Coenen, Jr., Dist. Atty., Penny Wise-Douchiere, Asst. Dist. Atty., Rayville, for appellee.
Before SEXTON, BROWN and STEWART, JJ.
SEXTON, Judge.
Defendant entered a Crosby[1] plea, while represented by appointed counsel, to possession of over 60 pounds but less than 2,000 pounds of marijuana, in violation of LSA-R.S. 40:966E, reserving his right to appeal the district court denial of his motion to suppress. The district court sentenced defendant to ten years at hard labor.
Defendant's retained counsel, who was substituted for his indigent defender, filed five assignments of error, all of which addressed the alleged excessiveness of defendant's sentence. Defendant thereafter retained new counsel, who assigned as additional error the district court's refusal to grant defendant's motion to suppress. Defense counsel next filed a motion with this court seeking to assign, as additional error, ineffective assistance of counsel, which motion was denied as a matter more appropriately addressed by way of an application for post-conviction relief at the district court level. Finally, although not assigned as error in any formal pleading, defendant argues in brief that the district court erred in denying his motion for continuance filed shortly over two weeks prior to his scheduled trial. Finding no merit to any of the arguments set forth by defendant, we affirm his conviction and sentence, but amend his sentence to give credit for time served.
At approximately 11:30 a.m. on December 7, 1988, the defendant, Robert Alonzo, was traveling east on Interstate 20 in Richland Parish on a two-way portion of the interstate which was under construction. Louisiana State Police Trooper Stephens, who was traveling west, passed defendant *138 and observed that his vehicle was approximately half a car length behind the vehicle preceding him. Since the trooper believed that defendant's vehicle was too close to avoid a collision if the preceding driver made an emergency stop or took evasive action, the trooper turned around, overtook and stopped defendant's vehicle.
When asked for his driver's license, defendant briefly searched a suitcase and then stated that he must have left it at home. As the defendant searched for his driver's license, the trooper noticed a very strong odor of air freshener. His experience in narcotics work was that air freshener was often used to mask the odor of contraband.
The trooper described the defendant's behavior as very talkative and very nervous. Defendant stated he was en route to Florida for a funeral. When questioned, there was a long pause after which defendant replied it was his aunt's funeral. Defendant produced an insurance card showing Sylvia Alonzo as the owner of the vehicle. The defendant explained that he was driving too closely because he wasn't paying attention while eating and drinking. A half-eaten sandwich and a fast food drink were observed in the vehicle.
The trooper had the defendant sit in the patrol car while a check through the state police computers was made for defendant's driver's license. The check revealed that defendant had a Texas driver's license which had expired in May of 1986. When asked if he had ever been arrested, defendant responded in the negative. However, a check of prior arrests by Trooper Stephens revealed a cocaine and weapons offense arrest in August of 1988. Defendant also had a prior arrest for DWI and another weapons charge.
The trooper issued traffic tickets for following too closely and for an expired driver's license and asked for permission to search the vehicle. The defendant initially gave consent to search. While Trooper Stephens was filling out the consent form, another trooper arrived on the scene and observed a clear plastic bag containing a white powdery substance in the vehicle. When the second trooper informed Trooper Stephens what he observed, the defendant withdrew his consent to search. At that point, Trooper Stephens immediately called for a narcotics dog. Defendant was advised of his Miranda rights and told that he was not under arrest.
After both officers observed the plastic bag with the white powdery substance, defendant was asked what was in the trunk. In response, he gasped and said he didn't know what was in the trunk because the car belonged to his ex-wife. He had previously told the officers that the car belonged to his wife.
When the narcotics dog arrived, approximately 25 minutes after Trooper Stephens' request, it strongly alerted twice on the rear quarter panel and the trunk section of defendant's vehicle. Defendant retrieved the trunk key which he had earlier thrown underneath the patrol car. The officers opened the trunk and found three large bags containing green vegetable matter which appeared to be marijuana. Defendant was then arrested and transported to state police troop headquarters where he was given another Miranda warning. Later, he was transported back to Richland Parish where he was asked to cooperate in the follow-up investigation by contacting the person to whom he was to deliver the marijuana. The record indicates that defendant's efforts were more of a pretense than a sincere effort.

MOTION TO SUPPRESS
In the first assignment of error, defendant argues that the motion to suppress should have been granted because Trooper Stephens made an illegal pretextual stop. This assignment of error is without merit. In brief, the state cites this court's case, State v. Cohen, 549 So.2d 884 (La.App.2d Cir.1989), writ denied, 559 So.2d 135 (La. 1990). There, the court explained that LSA-R.S. 32:81 means a following car should leave enough room in case the car in front stopped suddenly. In the instant case, the officer observed defendant driving half a car length behind the preceding motorist. His testimony was that there was an unsafe distance between the two vehicles.
As in Cohen, there is no evidence in this case that the stop for following too closely was a pretext to search for drugs. When the stop was made, the trooper observed that the defendant was extremely nervous and talkative and could not produce a driver's license which subsequent investigation determined was expired. Further, the car had a very strong aroma of air freshener which the trooper's experience indicated was frequently used to mask the smell of contraband. Defendant stated he had never *139 been previously arrested but a check revealed that defendant had been arrested on narcotics and weapons violations and DWI.
Defendant's argument and the circumstances of this case are strikingly similar to Cohen, supra, where we disposed of the issue as follows:
The defendant's next argument is that the stop for "following too closely" was a pretextual stop made in order to search for drugs. Defendant contends that the officer did not have reasonable suspicion to arrest the defendant and, thus, the search of his car was the fruit of an illegal arrest. In support of this contention, the defendant argues that the officer's actions after stopping the defendant were inconsistent with a concern for safety regulations....
In this case there is no evidence that the stop for following too closely was a pretense to search for drugs. The authority for the stop was La.C.Cr.P. Article 213, under which an officer may make an arrest for a misdemeanor committed in his presence. That occurred here, but a ticket was initially to be given rather than an arrest made.
For these reasons, we find that the stop was lawful.
State v. Cohen, supra at 886-7.
Similarly, in the case before the court, Trooper Stephens was objectively justified in stopping defendant for following the preceding vehicle too closely. He testified unequivocally that defendant was too close to the preceding vehicle to avoid a collision in the event that the lead vehicle stopped suddenly or was forced to take some sort of evasive action.
After the initial stop, the trooper ran a driver's license check on defendant when he was unable to produce a valid driver's license. Further, when the defendant, in response to a direct inquiry by Trooper Stephens, denied having been previously arrested, Trooper Stephens ran a computer check and discovered that defendant had previous arrests for cocaine and weapons offenses, as well as an arrest for driving while intoxicated.
Defendant further argues that his detention was unreasonably long prior to the arrival of the drug dog, especially in light of the fact that he was originally stopped for a traffic offense.
Defendant initially gave permission to search the vehicle but withdrew it when a second trooper observed a clear white plastic bag containing a white powdery substance in the vehicle. The drug dog was immediately requested and arrived within 25 minutes and made, according to Trooper Stephens, the hardest alert he had ever observed.
We again turn to Cohen for guidance:
We understand defendant's argument to be that the delay of approximately one hour and 15 minutes, between defendant's refusal of the consent to search and the actual search of his car, was an unreasonable period of time for the detention of the vehicle.
Although we are dealing here with an investigative detention rather than an investigative stop, some guidance is provided in determining "reasonableness" by the U.S. Supreme Court case of U.S. v. Sharpe, 470 U.S. 675, 105 S.Ct. 1568, 84 L.Ed.2d 605 (1985), which stated:
"In assessing whether a detention is too long in duration to be justified as an investigative stop, we consider it appropriate to examine whether the police diligently pursued a means of investigation that was likely to confirm or dispel their suspicions quickly, during which time it was necessary to detain the defendant. A court making this assessment should take care to consider whether the police are acting in a swiftly developing situation, and in such cases the court should not indulge in unrealistic second-guessing. A creative judge engaged in post hoc evaluation of police conduct can almost always imagine some alternative means by which the objectives of the police might have been accomplished. But `[t]he fact that the protection of the public might, in the abstract, have been accomplished by "less intrusive" means does not, itself, render the search unreasonable.' The question is not simply whether some other alternative was available, but whether the police acted unreasonably in failing to recognize or to pursue it."
In this case, Trooper Stephens testified that defendant's extreme nervousness, unkempt appearance, radar detector and CB radio, luggage inside car, and denial of criminal record all made him suspicious that the car contained contraband. After defendant withdrew his consent to *140 search, Stephens diligently pursued a means of investigation likely to quickly dispel or confirm his suspicions, radioing from a rural area for assistance. Considering the distances involved, we cannot say that detention of defendant's car for a little over one hour, pending the arrival of a drug sniffing dog, was unreasonable.
State v. Cohen, supra at 887 (citations omitted).
Once again, we note the similarity between Cohen and the instant case. Contrary to Cohen, though, the delay between defendant's revocation of his consent to search and the arrival of the drug dog was only 25 minutes. The trooper's suspicions of defendant were justified by defendant's extraordinary nervousness, lack of driver's license, the smell of air freshener (which he recognized by experience as a substance frequently used to mask the odor of contraband), and the sighting of the plastic bag in plain view in the vehicle by the second trooper.
Defendant relies on State v. Bunnell, 517 So.2d 439 (La.App. 1st Cir.1987), to say that he was illegally detained. However, Bunnell may be distinguished from the present case and from Cohen, supra, because the law officer in Bunnell was not suspicious of a particular crime or of illegal narcotics. Bunnell was detained because he was nervous and he and his companion had Florida driver's licenses while driving a New York automobile registered to Bunnell. The trooper wanted to search the car to determine if they were involved in illegal activity.
In the present case, Trooper Stephens suspected narcotics from the behavior of the defendant and the presence of the strong air freshener scent. Further, while he was making out the consent to search form, he was informed by a second trooper that a plastic bag containing a powdery white substance was in the vehicle.
Defendant's argument concerning the unreasonable delay is particularly damaged by the fact that the second trooper spotted the plastic bag containing white powder in plain view in defendant's vehicle. At that moment, probable cause to search the vehicle existed. State v. Cassell, 540 So.2d 1219 (La.App. 3rd Cir.1989), writ denied, 548 So.2d 321 (La.1989). Accordingly, any delay after that point was of no moment because the officers could have legally searched defendant's vehicle without waiting for the drug dog. While the request for the drug dog was laudable and was probably made out of an abundance of caution, it was unnecessary in light of the existing probable cause. Any delay thereafter did not affect defendant's rights.
In this matter, the initial stop, the detention, and the warrantless search were all conducted properly. The motion to suppress was properly denied, and this assignment of error is without merit.

EXCESSIVE SENTENCE
The defendant next argues the trial court's alleged failure to sufficiently articulate LSA-C.Cr.P. Art. 894.1 guidelines and the imposition of an excessive sentence.
In determining whether or not a sentence is excessive, this court first examines the record to see that the trial court took cognizance of the criteria of LSA-C.Cr.P. Art. 894.1. The trial judge is not required to list each and every aggravating or mitigating circumstance so long as the record reflects that he adequately considered the guidelines of the article. State v. Smith, 433 So.2d 688 (La.1983). Second, the court must decide whether the sentence imposed is too severe depending on the circumstances of the case and the background of the defendant. The sentence violates LSA-Const. Art. 1, § 20, if it is grossly out of proportion to the seriousness of the offense or nothing more than a purposeless and needless infliction of pain and suffering. State v. Bonanno, 384 So.2d 355 (La.1980).
In selecting a proper sentence, a trial judge is not limited to considering only a defendant's prior convictions but may properly review all prior criminal activity. State v. Palmer, 448 So.2d 765 (La.App.2d Cir.1984), writ denied, 452 So.2d 695 (La. 1984). The trial court is not required to render a suspended sentence or probation on a first felony offense. The judge may consider whatever factors and evidence he deems important to a determination of the best interest of the public and the defendant. State v. McKethan, 459 So.2d 72 (La.App.2d Cir.1984). The trial court has wide discretion to sentence within statutory limits. Unless there is a showing of manifest abuse of that discretion, the sentence is not set aside as excessive. State v. Square, 433 So.2d 104 (La.1983).
*141 The district court noted the defendant's age and that he had prior arrests involving cocaine, driving while intoxicated, and two weapons charges in 1988. In connection with the present charge, a possession of cocaine charge was dismissed. However, the assistant district attorney noted that the substance originally thought to be cocaine was actually amphetamine.
In mitigation, the trial court noted that the defendant had an excellent service record in Vietnam and that he had always maintained a job. Although a first felony offender, the court stated that defendant had prior convictions for drugs and weapons. Although the PSI does not show dispositions for the Texas arrests, defendant replied and did not deny the convictions or make a statement when given an opportunity to do so by the court. Because of defendant's prior record and the fact that he was a drug dealer or courier with a substantial amount of dangerous drugs, the trial court imposed a sentence of ten years at hard labor. Although the district court's articulation is certainly less than perfect, the record reflects an adequate factual basis for the sentence imposed.
In brief, defendant also argues the excessiveness of the sentence imposed on him and points out cases where defendants received lesser sentences for drug offenses. However, the sentence imposed was five years less than the maximum sentence of 15 years and defendant was not ordered to pay the mandatory $25,000 fine.[2] The record shows that defendant had transported drugs from Dallas to Florida on previous occasions. Although the sentence is substantial, the amount of contraband and the indications in the record that defendant was active in the drug trade support the sentence imposed. The ten-year hard labor sentence is not a manifest abuse of the district court's discretion.

ERROR PATENT
The pre-sentence investigation report in this matter reflects that defendant spent time in jail at the time of his arrest, but was apparently able to make bail because he was "free to go" following his arraignment. Additionally, at the time the PSI was being prepared, it reflects that defendant was incarcerated once again while awaiting the outcome of the PSI. At sentencing, the district court did not give defendant credit for that time. Article 880 of the Louisiana Code of Criminal Procedure requires the court to give the defendant credit for time served when rendering sentence. The failure to do so constitutes error, State v. Hall, 287 So.2d 798 (La. 1973), but may be corrected without the necessity of remand because it does not involve judicial discretion. See LSA-C.Cr.P. Art. 882. Accordingly, to the extent that the district court failed to mention this and because the record clearly reflects that defendant actually served time prior to the imposition of sentence, the sentence shall be amended to reflect credit for time served.[3]

CONTINUANCE
In brief, defendant complains of the district court's denial of his appointed counsel's oral motion for continuance made five days prior to defendant's scheduled trial.
LSA-C.Cr.P. Art. 707 requires a motion for continuance to be filed in writing and at least seven days prior to the commencement of trial. Defendant failed to comply with either of these requirements. Where no written motion for continuance appears on record, the denial thereof will not be considered. State v. Johnson, 440 So.2d 197 (La.App. 3rd Cir. 1983), writ denied, 444 So.2d 1240 (La. 1984), reconsideration denied, 446 So.2d 307 (La.1984). Further, there is no indication *142 that unexpected circumstances arose which prevented defendant's counsel from preparing a written motion, despite that defendant's counsel was appointed less than two weeks prior to the oral motion. See and distinguish State v. Ball, 482 So.2d 840 (La.App. 2d Cir.1986), where this court found an abuse of the district court's discretion where counsel was appointed at the time of sentencing after defendant's previous counsel had started to work at the district attorney's office. The evidence in Ball showed that counsel had no opportunity to prepare for defendant's sentencing.
Finally, the record reflects that the delays in defendant's receiving court-appointed counsel resulted from his own representations to the court that he would be retaining his own counsel. More than a year after his arraignment, no counsel had yet enrolled on defendant's behalf. After giving the defendant, pursuant to his own request, one additional week to procure his own attorney, the district court finally appointed counsel for defendant on April 6, 1990, 17 days before his scheduled trial.
We find no abuse of the district court's discretion in denying defendant's oral motion for continuance under the circumstances.

CONCLUSION
Finding no merit to any of defendant's arguments, we affirm his conviction and the sentence imposed; however, we amend the sentence to grant defendant credit for time served.
AMENDED AND AFFIRMED AS AMENDED.

APPLICATION FOR REHEARING
Before MARVIN, SEXTON, NORRIS, BROWN and STEWART, JJ.

ON REHEARING
PER CURIAM.
Defendant has sought a rehearing complaining solely of the treatment of the assignment dealing with his motion for continuance. Defendant particularly complains that we erred in that opinion in stating that there was no written motion for continuance.
Attached to defendant's rehearing application is a copy of what purports to be a Motion for Continuance. The motion appears to have been signed by a deputy clerk and by a judge, though their signatures are not legible. There is no "filed" stamp on the motion, and the motion is not in the record per se.
A similar copy is found attached as Exhibit B-2 to defendant's Motion to Designate Additional Assignments of Error and to Enlarge the Record. (That motion did not seek to have the Motion for a Continuance added to the record, but had to do with the Motion to Suppress.) The Motion for Continuance is also found as Exhibit 5 to defendant's motion entitled Supplemental Assignment of Error and Designation of Record. That motion did seek to expand the record to add the Motion for Continuance, as well as a number of other items. That motion was denied by order of this court on February 7, 1991.
It therefore seems clear that the record is technically devoid of a Motion for Continuance filed by the defendant. However, the lack of a written motion for continuance was not the only reason the assignment was found to lack merit. Importantly, defendant neither alleged nor demonstrated any prejudice resulting from the district court ruling.
Assuming arguendo that the Motion for Continuance was filed in the trial court, that motion was filed five days prior to trial, contrary to the seven days required by LSA-C.Cr.P. Art. 707. More importantly, the additional grounds upon which we based our disposition of this issue still exist. Defendant has neither alleged nor demonstrated any prejudice resulting from the denial of the continuance. Moreover, defendant's guilty plea waives all nonjurisdictional defects which may have occurred in pre-plea proceedings. State v. Buggs, 567 So.2d 744 (La.App. 2d Cir.1990).
For the foregoing reasons, this application for rehearing is denied.
NOTES
[1]  State v. Crosby, 338 So.2d 584 (La.1976).
[2]  In brief, the state noted that the defendant's sentence is illegally lenient because the district court failed to impose a mandatory fine and argued that this court "should correct the illegally lenient sentence to come within the minimum set by statute." However, it is the duty of the state to apply for the correction of an illegally lenient sentence. State v. Samuels, 471 So.2d 883 (La.App.2d Cir.1985). The mere mention or complaint of an illegally lenient sentence in the state's brief is not sufficient.
[3]  It is not necessary for us to determine the precise amount of credit to which defendant is entitled. The Louisiana Department of Corrections is the appropriate division of government to calculate such information and to maintain records on each of its prisoners. We merely note that defendant is statutorily entitled to such credit.
