Defendant was tried and found guilty of possession of heroin, MCLA 335.341(l)(b); MSA 18.1070(41)(l)(b). He was arrested for this offense subsequent to a random stop and frisk while serving as an inmate in the state prison in Jackson. The prison patrolman who conducted the "routine shakedown” testified that he found a cellophane bag containing heroin on the floor immediately in front of Hicks. The first issue raised by defendant raises the propriety of the stop and seizure, to wit, that certain of his constitutional rights have been violated. This Court has previously addressed the matter of searches and seizures in penal institutions holding that:
"Among the substantial and important government interests involved in the maintenance of penal institutions are the 'preservation of internal order and discipline, the maintenance of institutional security against escape or unauthorized entry.’ ” People v Oliver, 63 Mich App 509, 515; 234 NW2d 679 (1975).
Consistent with the rationale used in Oliver, supra, where searches prior to and after periods where inmates had visited with outsiders was upheld, we find that searches as were conducted in this case preserve the internal security of penal institutions and could not violate defendant’s reasonable expectations of privacy.
Defendant also cites as reversible error the trial judge’s ruling which permitted use of prior convictions for the purpose of impeaching credibility. The use of prior convictions is of course discretionary with the trial judge. People v Jackson, 391 *426Mich 323; 217 NW2d 22 (1974). A review of the record shows that the trial judge recognized that he had such discretion and exercised it properly.
Having examined defendant’s remaining allegation of error pertaining to sentences received and which were blurted out by defendant himself, we find same to be without merit.
Affirmed.