
163 Ill. App.3d 215 (1987)
516 N.E.2d 582
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellant,
v.
DANIEL HADNOT, Defendant-Appellee.
No. 87-0405.
Illinois Appellate Court  First District (2nd Division).
Opinion filed November 3, 1987.
*216 Richard M. Daley, State's Attorney, of Chicago (Thomas V. Gainer, Jr., and Marie Quinlivan Czech, Assistant State's Attorneys, of counsel), for the People.
Paul Biebel, Jr., Public Defender, of Chicago (Alison Edwards, Assistant Public Defendant, of counsel), for appellee.
Judgment affirmed.
JUSTICE BILANDIC delivered the opinion of the court:
Defendant was charged with murder, attempted armed robbery and armed violence. The State appeals the trial court's order granting defendant's motion to suppress certain statements.
On December 10, 1985, at about 6:30 p.m., David Yoon, the owner of a dry cleaning establishment, was murdered in the course of an attempted armed robbery. Four witnesses aided in the investigation. The first witness, a passing truck driver, told police he saw three black men on the corner approach the victim from behind as *217 the victim was locking the store. One walked up and fired a shot. Two of the men immediately fled and the other hunched over the victim but fled as the witness parked his truck.
A second witness told the police that he had just left the cleaning store and heard a shot. He saw three black men in their early twenties "fleeing the scene."
The third witness had just left a neighboring tavern, heard a shot, and saw three black men flee in separate directions.
The last witness, Betty Stanton, managed the cleaning store, which was owned by the victim. As she left the store just before the shooting, she saw three or four male blacks standing on the corner. She was able to identify one of the men as a defendant because he was a customer. When she returned to the scene, she noticed that her boss had been shot. At that time, the men she previously saw were no longer at the scene.
Betty Stanton furnished the detectives with one of the defendant's cleaning bills. From this lead, the detectives were able to determine that the defendant had a criminal record and was released from the penitentiary on November 20, 1985. Stanton identified defendant from a photo as one of the men she saw standing on the corner before the shooting.
The murder occurred at 6:30 p.m. At 11:15 p.m. the same day, the detectives went to defendant's home. He denied being at the scene. He was frisked, handcuffed, placed in a squad car, taken to the station, and locked in an interview room. He was apprised of his Miranda rights.
At approximately 3 p.m. on December 11, witness Stanton identified defendant from the lineup. Another witness stated that defendant "looked like" the shooter. At this point, defendant agreed to take a polygraph test. Defendant phoned his mother and informed her that he was being held at the police station to take a polygraph examination the next day.
The next day, December 12, at 6 p.m., defendant was taken for his polygraph examination. One of the detectives told defendant that he would be released if he passed the polygraph test. Although he admitted being at the scene, defendant nevertheless passed the polygraph test, but the police did not release him from custody.
After the polygraph examination, defendant told the detectives that when the victim was murdered, he was talking with some friends. He stated that he heard a shot and saw a man he knew to be Wayne Anderson running with a gun. On the way back to the station, defendant pointed out Anderson's residence to the detectives.
*218 At this point, the testimony from the defendant and the State is conflicting in most respects. The State contends that the detective told defendant he was released from custody at 2:50 a.m. on December 13. However, the record does not contain a time-stamped release form to support that fact. The State contends that the defendant voluntarily remained at the station because he feared for his life after implicating Anderson. Defendant responds that he continued to be confined in a locked interview room and was not allowed to leave except to use the bathroom. He continued to be interrogated at repeated intervals, thereby depriving him an opportunity to rest. This resulted in his implicating another person, during one of these sessions, later in the evening of the same day. Defendant stated that the man he implicated was frequently at his home. Defendant's mother agreed to phone the police when the man appeared at her home. Upon hearing from the mother, the police went to defendant's home and arrested this man.
The State again asserts that although defendant knew he was free to leave, he voluntarily agreed to remain yet another night at the police station.
The next day, December 14, at 11 p.m., defendant was questioned by an assistant State's Attorney from the felony review division. The assistant State's Attorney charged defendant with murder, attempted armed robbery and armed violence. The following morning, December 15, was the first time that defendant was taken before a judge.
In summary, the defendant was taken into custody on December 10, 1985, at approximately 11:15 p.m., and remained in uninterrupted custody without being brought before a judge until the morning of December 15, 1985.
The trial court did not believe the State's evidence that the defendant voluntarily remained at the police station after his alleged release on December 13. Although the court found that defendant was arrested with probable cause and that the actions of the police during the first two days of confinement were reasonable, the court also found that the statements made by defendant on the third and fourth day of custodial confinement, i.e., December 13 and 14, 1985, were not voluntarily given. The court also found that the four-day detention amounted to a violation of the rule of law set out in Gerstein v. Pugh (1975), 420 U.S. 103, 43 L.Ed.2d 54, 95 S.Ct. 854. Along with this violation, which the court used as a factor in suppressing the statements, the court found that defendant's will was overcome in that: (1) defendant was not able to communicate with *219 his family; (2) defendant was not allowed to change clothes, shower, or use the bathroom regularly; (3) the police used a "Mutt and Jeff" routine where one detective played "Mr. Nice Guy" so that defendant would tell him anything; (4) the police used techniques which were designed to induce defendant to confess; and (5) the police did not keep their promise that defendant would be released if he passed the polygraph test. The court concluded that the police used techniques designed to overcome the will of defendant. Therefore, the trial court suppressed, as involuntary, the statements made by defendant on the third and fourth days of the custodial confinement. The State appeals this suppression determination.
The State contends that the trial court committed reversible error in suppressing the statements made by defendant on the third and fourth days of his custodial interrogation. It contends that the court improperly relied on Gerstein v. Pugh (1975), 420 U.S. 103, 43 L.Ed.2d 54, 95 S.Ct. 854, because the failure to grant a Gerstein hearing to a defendant is not a basis for suppression of evidence although it may be a basis for a civil suit under 42 U.S.C. § 1983 (1982).
It is conceded that the police never made an attempt to obtain a warrant. At 11:15 p.m. on December 10, 1985, without a warrant, defendant was handcuffed, placed in a squad car, and taken from his home to a police station. He remained in uninterrupted custody for five days before he was first taken before a court for a probable cause hearing. Although there is a conflict in testimony as to whether the defendant was free to leave after the third day of custody, the trial court determined that the defendant was not free to leave and was "outraged" that the defendant was detained for five days before being brought before a judge.
 1 In Gerstein v. Pugh (1975), 420 U.S. 103, 114, 125, 43 L.Ed.2d 54, 65, 71-72, 95 S.Ct. 854, 863, 868-69, the United States Supreme Court ruled that the constitution requires a timely judicial determination of probable cause to arrest as a prerequisite to an extended restraint of liberty following arrest. When a person is arrested without a warrant, the determination must be made promptly after arrest. Although this constitutional right is explicitly stated in Gerstein, there are no remedial measures mandated by that court for a violation of that right.
Illinois has codified the Gerstein rule. (Ill. Rev. Stat. 1983, ch. 38, par. 109-1.) The Illinois statute does not provide a remedy for violation of its mandate. Therefore, a defendant must demonstrate that his statements were involuntary if he is to succeed in having *220 them excluded. People v. Lucas (1980), 88 Ill. App.3d 942, 948-49, 410 N.E.2d 1040, appeal denied (1981), 82 Ill.2d 586.
 2 A delay in presenting a defendant to a judge for a probable cause hearing is one circumstance to be considered in determining the voluntariness of a statement procured during the delay. (People v. Brooks (1972), 51 Ill.2d 156, 165, 281 N.E.2d 326.) This is not the only factor, however, and the trial court must look to the totality of the circumstances. Culombe v. Connecticut (1961), 367 U.S. 568, 606, 6 L.Ed.2d 1037, 1060, 81 S.Ct. 1860, 1881.
 3 The fallacy of the State's argument is that they urge reversal on the basis that the trial court relied only on the prolonged detention and delay of the probable cause hearing to suppress the statements. We disagree. The record clearly demonstrates that the trial court considered the totality of the circumstances in reaching its conclusion. One of the circumstances was the delay in providing a Gerstein hearing.
 4, 5 Factors to be considered in determining the voluntariness of a confession are: (1) giving of Miranda warnings; (2) the time between the arrest and the confession; (3) the presence of any intervening circumstances; and (4) the flagrancy and purpose of the official misconduct. (People v. Lucas (1980), 88 Ill. App.3d 942, 949, 410 N.E.2d 1040, appeal denied (1981), 82 Ill.2d 586.) It is the trial court's function to determine the credibility of witnesses at a hearing on a motion to suppress. (People v. Richard (1980), 88 Ill. App.3d 247, 252, 410 N.E.2d 459.) The trial court's decision on this issue will not be reversed in the absence of manifest error. People v. Lucas (1980), 88 Ill. App.3d 942, 949, 410 N.E.2d 1040, appeal denied (1981), 82 Ill.2d 586.
In reviewing the evidence, the trial court considered the defendant's confinement during two separate intervals. The first period occurred from the time defendant was taken from his home on December 10, 1985, at 11:15 p.m., until he was allegedly told he was free to leave on December 13, 1985, at 2:50 a.m. Statements taken during this period were not suppressed.
The second period, although consecutive and uninterrupted, started from 2:50 a.m. on December 13, 1985, until December 15, 1985. The only statements suppressed were made during this period.
If the trial court relied only on the prolonged detention, it would have suppressed all of defendant's statements, from the initial detention until he was charged with a crime on the fifth day.
The trial court correctly applied the law and only suppressed the statements it found to be involuntary under the totality of the circumstances. *221 We conclude that the evidence was sufficient to support the determination of the trial court.
Accordingly, the judgment of the circuit court of Cook County is affirmed.
Affirmed.
SCARIANO, P.J., and STAMOS, J., concur.
