
22 Ill. App.3d 733 (1974)
317 N.E.2d 734
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
HOWARD EVANS, Defendant-Appellant.
No. 58900.
Illinois Appellate Court  First District (4th Division).
August 28, 1974.
*734 Paul Bradley, of State Appellate Defender's Office, of Chicago, for appellant.
Bernard Carey, State's Attorney, of Chicago (Patrick T. Driscoll, Jr., Frank Baumgart, and Mary Ellen Dienes, Assistant State's Attorneys, of counsel), for the People.
Reversed in part and affirmed as modified.
Mr. JUSTICE DIERINGER delivered the opinion of the court:
The defendant, Howard Evans, was tried by the court sitting without a jury in the Circuit Court of Cook County and was convicted of both possession of a concealed weapon and for possession of a weapon within 5 years of a felony conviction. He was sentenced to concurrent terms of not less than 2 nor more than 5 years.
The issues on appeal are whether a court may hold a hearing on a motion to suppress physical evidence concurrently with a bench trial where the defense counsel has expressly consented, whether it was error to deny the defendant's motion to suppress physical evidence, and whether the sentence for the lesser offense of possession of a concealed weapon should be vacated and the sentence for the more serious offense should be reduced pursuant to the Unified Code of Corrections.
A Chicago policeman testified that while he and his partner were patrolling in an unmarked squad car on September 26, 1972, he saw the defendant with three other men in the area of 4349 West Gladys in the city of Chicago. When the officers stopped their car in the middle of the street, one of the four men broke away and ran up a flight of stairs to the open porch of a two-flat and threw something into the yard below. When the object was recovered, it was found to be a .32-caliber chrome-plated revolver.
After recovering the revolver the other three men were patted down, *735 and another revolver was found on the defendant. Neither he nor the other two men attempted to flee.
At trial the motion to suppress the revolver was denied and the defendant was found guilty of both possession of a concealed weapon and possession of a weapon within 5 years of a felony conviction.
 1 The defendant first contends he was denied due process of law in that his defense counsel was forced into waiving a formal hearing on the motion to suppress physical evidence. The defendant suggests the facts of People v. Pugh (1971), 133 Ill. App.2d 168, are similar to this case. In that case the court reversed and remanded a judgment against the defendant when the trial judge insisted on hearing a motion to suppress with the trial even over the objection of trial counsel. However, in this case defendant's counsel agreed to have the motion heard along with the trial after a brief discussion with the judge as shown by the record:
"THE COURT: Bring out Evans now. Let's try him. Mr. Norris, on this Evans case you filed a motion to suppress evidence?
MR. NORRIS: Yes, Judge.
THE COURT: Do you agree to let that go with the trial?
MR. NORRIS: Yes, Judge."
It is well settled a defendant can waive certain rights through the action of his attorney. People v. Sailor (1969), 43 Ill.2d 256.
The defendant next complains the court erred in denying the motion to suppress because the search was not justified, citing the case of Terry v. Ohio (1968), 392 U.S. 1, 20 L.Ed.2d 889, 88 S.Ct. 1968. The defendant contends the fact the police officer saw the man who discarded the gun in the company of the defendant for only a few seconds does not justify a conclusion they were together, and the police may not detain and search a person simply because he is close to or even in the company of another person lawfully arrested. People v. Galloway (1956), 7 Ill.2d 527.
 2 However, that case does not preclude police from conducting a pat-down of the companions of one who was lawfully arrested in order to protect themselves or others who may be nearby. In People v. Lee (1971), 48 Ill.2d 272, Terry was applied to sustain a weapons search by a police officer who had reasonable grounds to believe that persons they were confronting might be dangerous. The court quoted from Terry:
"`We merely hold today that where a police officer observes unusual conduct which leads him reasonably to conclude in light of his experience that criminal activity may be afoot and that the *736 persons with whom he is dealing may be armed and presently dangerous, where in the course of investigating the behavior he identifies himself as a policeman and makes reasonable inquiries, and where nothing in the initial stages of the encounter serves to dispel his reasonable fear for his own or others' safety, he is entitled for the protection of himself and others in the area to conduct a carefully limited search of the outer clothing of such persons in an attempt to discover weapons which might be used to assault him.'" 48 Ill.2d at 275.
In U.S. v. Berryhill (9th Cir.1971), 445 F.2d 1189, 1193, the court stated:
"It is inconceivable that a peace officer effecting a lawful arrest of an occupant of a vehicle must expose himself to a shot in the back from defendant's associate because he cannot, on the spot, make the nice distinction between whether the other is a companion in crime or a social acquaintance. All companions of the arrestee within the immediate vicinity, capable of accomplishing a harmful assault on the officer are constitutionally subject to the cursory `pat-down' reasonably necessary to give assurance they are unarmed."
 3 On the issue of whether the defendant is entitled to have the lesser sentence vacated, the State confesses error because the record reveals no evidence to indicate the two offenses were independent or separable in any way. Judgment should have been entered only for the more serious crime of possessing a weapon within 5 years of a felony conviction. Therefore, the judgment of guilty for possession of a concealed weapon is reversed.
 4 The defendant also maintains the sentence of 2 to 5 years for the more serious offense is excessive under the Unified Code of Corrections. That offense, in violation of section 24-1(b) of the Criminal Code (Ill. Rev. Stat. 1971, ch. 38, § 24-1(b)) is now designated as a Class 3 felony for which the minimum term may not be greater than one-third of the maximum term set. (Ill. Rev. Stat. 1973, ch. 38, § 1005-8-1(c) (4).) Therefore, the minimum term in this case must be no greater than one-third of 5 years, or 1 year and 8 months, and the judgment is so modified and affirmed in all other respects.
Reversed in part and affirmed as modified.
ADESKO, P.J., and JOHNSON, J., concur.
