delivered the opinion of the court:
Following a jury trial, defendant-appellant Gary Fields was convicted of attempted murder and sentenced to a term of seven years’ imprisonment. Defendant raises the following issues on appeal: (1) whether the trial court erred in allowing the State to introduce defendant’s oral statement into evidence in violation of defendant’s fifth and sixth amendment rights under the Federal Constitution (U.S. Const., amends. V, VI); (2) whether the trial court erred in ruling that defense counsel had opened the door to a previously excluded oral statement that defendant had made to his supervisor; and (3) whether the trial court erred in denying defendant’s motion to preclude the introduction into evidence of the gun which was seized from his house. We affirm.
The following facts were elicited at the hearing on defendant’s motions to quash arrest and suppress evidence. Officer Gentzle of the Hazel Crest police department testified that on June 8, 1988, he arrived at the scene of a shooting at 3207 Birchwood, in Hazel Crest, Illinois. Gentzle spoke to Officer Rook, who told Gentzle that the victim, Timothy Shade, had been shot and had given Rook a description of the individual who shot him. Additionally, Rook gave Gentzle a description of the assailant’s car and an invoice with defendant’s name on it. Gentzle was also advised that prior to the shooting, an argument between defendant and a friend of Shade’s arose over the invoice.
Officer Gentzle and Detective Peers proceeded to defendant’s house, which corresponded to the address on the invoice, and Gentzle observed a car in the driveway which was similar to the description of the assailant’s car. When defendant came to the door, Gentzle observed that defendant matched the description of the assailant. Officer Gentzle confirmed defendant’s identity and that defendant had been at the place of the shooting earlier that evening. Defendant was then placed under arrest.
Defendant’s wife, Deloris Fields, testified that the night of the shooting, police knocked on her door and waited as she got her husband. She said that when defendant came to the door, he went outside and conversed with the officers. She next saw her husband being led to the car in handcuffs.
Defendant testified that after being summoned to the door, the police entered his home without permission, and that he was arrested in his living room without having stepped out the door. Defendant also testified that on June 21, 1988, 13 days after the incident, he was *348called to his supervisor’s office at work to discuss an incident report, but denied that he made any incriminating statements.
Gentzle further testified that while at the police station, defendant admitted that he owned a gun, called his wife, and gave Gentzle permission to go and get the gun. Gentzle returned to defendant’s home, and defendant’s wife handed him the gun. Deloris Fields, however, stated that the police entered the home without her consent, searched her home, and returned from the bedroom with a gun.
At the hearing on defendant’s motion to suppress statements, Booker Matthews testified that he was the Chief of Security in the Youth Division of the Illinois Department of Corrections. Defendant was an employee under his supervision in 1988. According to Matthews, employment regulations dictated that defendant submit a report concerning the incident. Defendant did in fact file an incident report, and on June 21, 1988, the superintendent asked Matthews to find out what type of weapon had been involved in the incident.
Matthews called defendant that day and left a message for defendant. Defendant returned his call, and when asked which type of gun had been used, responded that the requested information was in the incident report. At this point the conversation ended.
Matthews further testified that later that same afternoon, the defendant came, unsolicited and of his own volition, to Matthews’ office. According to Matthews, defendant asked if the information regarding the weapon was in the report. Matthews did not initially ask defendant any question, but defendant himself closed the door to the office and sat down. Defendant stated that his family was extremely upset with him. At this point, Matthews said to defendant: “[A]re you trying to tell me you shot the guy?”
Defendant replied that he did shoot the victim and further stated that his lawyer was seeking to suppress the gun, that the discharged bullet was too fragmented for comparisons, that the witness could not identify him and that defendant’s lawyer told him there was about a 50/50 chance of acquittal.
The trial court denied defendant’s motions to quash the arrest and to suppress the statements, finding that the conversation with Booker was initiated by defendant, in a noncustodial situation, and that defendant had not been threatened or promised anything. Thus, the trial court ruled that neither defendant’s fifth nor sixth amendment rights had been violated. Later, before trial, the trial court granted a defense motion in limine, ruling that the parts of the conversation with Matthews pertaining to defendant’s conversations with his lawyer were inadmissible.
*349At trial, the People called the victim, Timothy Shade. Shade testified that on June 8, 1988, he was living with Anthony Bankshale at 3207 Birchwood in Hazel Crest. Shade answered the door at 10 p.m., and the defendant was at the door. Defendant asked to speak to Bankshale. Shade listened to the ensuing conversation between defendant and Bankshale. The two men were arguing over money, and, as defendant left, Shade heard him threaten to return and burn the house down.
About 20 minutes later, Shade and William Mason decided to go to the store. As they walked across the street, Shade saw a car approaching. Mason saw a gun in the car and warned Shade. Shade observed defendant in the car and saw that defendant was pointing a gun at him. Shade tried to turn away and was then shot in the shoulder. At the time, Shade was wearing Bankshale’s hat and a jogging suit. Shade further stated that both he and Bankshale were wearing dark jogging suits that night. Each testified that they were similar in height, weight and age.
The victim testified that he spoke to the police regarding the incident. Further, Shade testified that he observed the barrel of defendant’s gun and that the gun recovered from defendant’s house was similar to the one he was shot with.
Next, William Sherk, a firearms examiner, testified that the rifling of the bullet recovered from the victim’s body was consistent with having been fired from defendant’s gun, although due to the fragmentation of the bullet, the comparison was incomplete.
Anthony Bankshale also testified. He related that he and the defendant had argued that night over a bill for landscaping services, and testified consistently with the victim’s description of the argument. Bankshale gave the police a description of defendant, defendant’s car and a copy of the landscaping bill. Officers Roof and Gentzle testified at trial consistently with their testimony at the hearings on the motions to suppress and quash.
Booker Matthews, defendant’s supervisor at defendant’s workplace, the Department of Corrections, also testified. His testimony about his conversation with defendant was consistent with his testimony at the hearing on the motion to suppress. On cross-examination, defense counsel questioned Matthews about the reports Matthews had made concerning his conversation with the defendant. Defense counsel referred to one of the reports, which indicated that defendant gave Matthews a detailed report of the incident, and defense counsel asked what details were given Matthews.
*350At this point a sidebar took place. The State argued that defense counsel had opened the door to the previously excluded statements involving the defendant and his conversations with his attorney. Defense counsel indicated that he only sought to refer to details of the actual occurrence itself. The trial court ruled that the order in limine had been violated, and on redirect examination, the State was allowed to bring out the contents of the previously excluded testimony.
Defendant’s wife testified at trial on behalf of defendant. Officer Gentzle had previously testified that she had told him defendant came home at about 10:30 or 11 p.m., visibly upset, that defendant had left for 20 minutes at this time and then returned. At trial, however, defendant’s "wife testified that her husband came home at about 10:30 or 10:45 p.m. on the night of the shooting, and simply went to the garage to punch his punching bag.
Defendant himself testified, admitting his presence at the victim’s home and arguing with Bankshale, but denying that he returned and shot the victim. Defendant, as he had during the hearing on pretrial motions, denied making any admissions to Matthews.
The first issue we address is whether the trial court erred in allowing the State to introduce defendant’s statements in violation of the fifth or sixth amendment of the United States Constitution. Defendant contends that he was deprived of his constitutional rights by the introduction of any part of his statements to Matthews.
Defendant acknowledges that there was some difference between the testimony of Matthews and himself regarding the conversation in which he incriminated himself. Defendant, however, argues that “[Regardless of which version of the events leading up to the interrogation *** is accepted by this court,” the statement should have been suppressed.
According to defendant, it is uncontested that the warnings set out in Miranda v. Arizona (1966), 384 U.S. 436, 16 L. Ed. 2d 694, 86 S. Ct. 1602, were not given prior to the statement. Defendant argues that the conversation was custodial in nature. Further, it is uncontested that defendant’s sixth amendment right to counsel had already attached due to the fact that defendant had been charged with a crime. Miranda warnings were thus required to ensure defendant’s rights under the sixth amendment, as Matthews was an agent of the police at the time.
The State in response argues that the conversation was not custodial in nature and that there is no evidence to support the view that Matthews was an agent of the police.
“In [Miranda], the Supreme Court held that a prosecutor may not use an exculpatory or inculpatory statement arising from a custodial interrogation of a defendant unless the prosecutor can demonstrate the use of procedural safeguards effective to secure the defendant’s privilege against incriminating himself. The Miranda decision requires the agent of the prosecution to warn the defendant prior to questioning that: (1) he has the right to remain silent; (2) anything he says can be used against him in a court of law; (3) he has the right to have an attorney present; and (4) if he cannot afford an attorney, one will be appointed for him prior to questioning if he so desires. [Citation.]”
It is clear that the Miranda decision applies to any interrogating party who acts as an agent of the prosecution. Kerner, 183 Ill. App. 3d at 103; People v. Baugh (1974), 19 Ill. App. 3d 448, 451, 311 N.E.2d 607.
“Only statements made in the course of a custodial interrogation or where an individual’s freedom has otherwise been significantly restrained must be preceded by Miranda warnings. [Citations.] The test for determining whether custody exists is not the presence or absence of probable cause [citation], or whether the person questioned is one whom the police suspect [citation]. Rather, in determining whether the statement was made in a custodial setting, the court must look to the entire set of circumstances surrounding the questioning, with no single factor controlling, and then objectively evaluate whether a reasonable innocent man would believe he was free to leave. [Citations.]
Relevant factors include the place of interrogation, any statements or nonverbal conduct indicating the accused is not free to leave, the extent of the knowledge of the police officers and the focus of their investigation, and the intentions of the [police] officers. [Citations.] The court should also look to the time, length, mood and mode of the interrogation, the number of police officers present and the presence or absence of friends or family of the accused, the manner in which the person questioned got to the place of interrogation, whether he was allowed to walk within and from the location of the interrogation *352unaccompanied by police, and age, intelligence, and mental makeup of the accused. [Citations.] A reviewing court will not disturb the trial court’s determination of a motion to suppress unless it is manifestly erroneous. [Citations.]”
Defendant cites two cases in support of his argument that the failure of Matthews to give him Miranda warnings violated his fifth amendment right against self-incrimination. Both, however, are distinguishable. First, defendant relies on Smith. There, the defendant was subjected to a 12-hour interrogation at a police station. Though defendant had voluntarily come to the police station with a friend, the friend had left, and defendant was aware of this. Defendant was alone for hours with police officers she did not know. The evidence showed that once defendant began making admissions, she became the entire focus of the interrogating officers. Further, defendant’s written statement did not indicate a high degree of intelligence. Defendant herself in Smith testified that she was harassed by the officers.
In People v. Clark (1980), 84 Ill. App. 3d 637, 405 N.E.2d 1192, the defendant and a friend were at the scene of the crime where defendant’s husband had been shot. She was asked to sit in the police car, and when she was asked what happened, she said that she had shot her husband. At this point, defendant’s friend was asked to leave the car, and defendant was interrogated and related details of the incident. The Clark court held that though the initial question was not improper, once the initial incriminating information was elicited, defendant should have been given her Miranda warnings. 84 Ill. App. 3d at 641.
In this case, accepting Matthews’ version of the conversation with defendant, it is clear that the conversation was not custodial in nature. According to Matthews, defendant, who worked with Matthews, voluntarily came into his office and brought the subject of the incident up by asking if the information his employer desired was in the report. Then, defendant closed the door to the office, sat down and sighed. Defendant then said that his family was extremely upset with him. When Matthews asked if defendant had in fact shot the victim, defendant admitted that he had, and began discussing his case.
Clearly the instant case is a far cry from the cases defendant relies upon. Here there was no hours-long questioning session. Here defendant worked with and had a relationship with Matthews. Defendant initiated the subject matter of the conversation, volunteered much of the information, and was not made to feel that he could not leave. On balance, we hold that defendant was not subjected *353to a custodial interrogation, and as a result the trial court’s ruling was not manifestly erroneous.
We further hold that the trial court’s ruling was not against the manifest weight of the evidence when the issue is analyzed under sixth amendment grounds. Defendant had been charged with the instant offense at the time of the conversation, and thus, defendant’s sixth amendment rights were guaranteed.
“The sixth amendment right to counsel includes an affirmative obligation on the State not to circumvent the accused’s right to have an attorney serve as an intermediary between him and the State. The sixth amendment is not violated where the State obtains the information by luck or happenstance. But the right is violated where the State knowingly exploits an opportunity to confront the accused without counsel being present or where the State intentionally creates such an opportunity. [Citation.] The functional equivalent of interrogation is also prohibited. This particularly includes secret interrogation techniques where the defendant is able to show that the police and their informant (a) ‘took some action, beyond merely listening,’ and (b) that this action was ‘designed deliberately to elicit incriminating remarks.’ [Citation.]”
The mere fact that one works at a job which has some connection to law enforcement work does not mean that one is connected with prosecutorial law enforcement functions. (See, e.g., People v. Kavinsky (1981), 91 Ill. App. 3d 784, 414 N.E.2d 1206.) Here the record is devoid of any indication that Matthews was other than intending to simply fill out a routine incident report at work. Defendant cites to no place in the record which suggests that Matthews’ design was to deliberately elicit incriminating information from defendant. The lack of any connection between Matthews and prosecutorial law enforcement functions supports the trial court’s finding that no sixth amendment violation occurred. As a matter of clarification, Matthews secured the report and information on the weapon at the behest of Ms supervisor, and it was apparently this “higher-up” who notified law enforcement personnel of the contents of the conversation. Defendant, however, makes no suggestion that Matthews’ supervisor was working with law enforcement personnel and intending to present the opportunity for defendant to incriminate himself without the benefit of representation.
*354We next address the issue of whether the trial court erred in ruling that defense counsel opened the door to the previously excluded statement that defendant made to Matthews. Here, the statement of defendant that he shot the victim is not at issue. That statement was not excluded and, as we have indicated, was not elicited in violation of defendant’s constitutional rights. The statements at issue were ruled inadmissible based on a motion in limine, which the trial court granted due to the prejudicial nature of the statements. These statements include that defendant’s attorney was seeking to suppress the gun, that the bullet was too fragmented for adequate comparison, that a witness could not identify defendant, and that defendant’s attorney told defendant he thought defendant’s chances of acquittal were about 50/50. The State makes no argument that the statements should not have been ruled inadmissible in the first instance.
Defendant argues that he did not open the door to the statements when he asked about what “specific details” were noted in Matthews’ report. Defense counsel at trial and on appeal insists that he was referring to the details of “the incident,” meaning the occurrence of the shooting and the argument which led to the shooting. However, defendant has pointed to no other statements which defendant made to Matthews, and thus it appears that defendant might have opened the door to something. If defense counsel were to bring before the jury that Matthews had made the reference in his report to details of the incident, and then defense counsel were to proceed to lead the jury to believe that defendant spoke no other words to Matthews, Matthews’ credibility could be undermined.
Nonetheless, we are convinced that the specific remarks about what defendant’s attorney was going to do in the case (file a motion to suppress), the condition of evidence and defense counsel’s assessment of defendant’s chances of acquittal were prejudicial, not relevant and should not have been brought out in front of the jury. A trial court has the power to fashion testimony in such a way as to meet the necessity of its introduction, while at the same time minimizing any prejudice to the defendant. In the case sub judiee, the trial court could have limited the testimony to a general nature (i.e., for Matthews to testify to the effect that defendant related certain discussions with his attorney about his case). This way, Matthews’ credibility would have been protected, and the prejudice to defendant, which we consider manifest, would have been minimized.
We therefore hold that the introduction of the testimony in its detail sub judiee was error. The question then becomes whether the error was harmless or reversible. Errors will be held harmless when *355they could not reasonably have affected the result or contributed to defendant’s conviction. (People v. Carlson (1982), 92 Ill. 2d 440, 442 N.E.2d 504.) At trial, the evidence included: the positive testimony of the victim that defendant was the individual who shot him; the fact that defendant admitted shooting the victim to Matthews; the fact that the fired bullet was “consistent” with having come from defendant’s gun; the victim’s testimony about the similarity between the barrel of the gun used during the offense and defendant’s gun; and the consistent testimony of Bankshale and the victim relating to the argument over the landscaping bill, defendant’s threat to return and bum down Bankshale’s house, and the similarity in their appearance and clothing. In light of the preceding, we hold that the error was harmless.
The final issue we address is whether the trial court erred in denying defendant’s motion to preclude the introduction of the gun seized from defendant’s residence at trial. Defendant’s argument as to this issue is that there was an insufficient connection between the crime, defendant, and the gun to justify the gun’s introduction into evidence. Defendant notes that the victim was unable to positively identify the gun as the one used during the incident, the ballistics expert was unable to positively identify the gun as having actually fired the bullet and the gun was not found on defendant’s person at the time of arrest.
In support of his argument, defendant cites a number of cases which are distinguishable. These cases involve introduction of a gun into evidence which was positively stated not to be the gun used during the incident (People v. Jackson (1990), 195 Ill. App. 3d 104, 551 N.E.2d 1025); was found in an apartment of someone defendant was minimally associated with, several weeks after the crime, when defendant was never identified as having possessed the gun (People v. Yelliott (1987), 156 Ill. App. 3d 601, 509 N.E.2d 111); was not used in the offense, the State conceded, although it was found on defendant when defendant was arrested (People v. Wade (1977), 51 Ill. App. 3d 721, 366 N.E.2d 528); and was a shotgun found in defendant’s apartment, when the offense involved a handgun (People v. Suerth (1981), 97 Ill. App. 3d 1005, 423 N.E.2d 1185).
Defendant has not argued that the evidence was irrelevant, only that it was too prejudicial. In the case of People v. Hoffstetter (1990), 203 Ill. App. 3d 755, 772-73, 560 N.E.2d 1349, the court stated:
“Testimony concerning a weapon may be admitted into evidence where there is proof connecting the weapon to defendant and the crime. [Citation.] However, it is only necessary that the *356weapon be suitable for the commission of the offense, it is not necessary that it be the weapon actually used in the offense. [Citation.] Further, proof of the connection between the weapon and the defendant or the crime may be circumstantial, and the determination of the evidence’s admissibility is within the trial court’s discretion. [Citation.]”
Here, the victim did see the barrel of the gun and testified that the gun was similar to the one he was shot with. The ballistics expert testified that rifling on the bullet was consistent with having been fired from defendant’s gun. The gun was found at defendant’s house and thus clearly had been under defendant’s control. We therefore hold that there was a sufficient nexus between the weapon, on the one hand, and defendant and the crime, on the other, to support the trial court’s determination that the gun was admissible.
Accordingly, the judgment of the circuit court is affirmed.
EGAN, P.J., and LaPORTA, J., concur.