Mercure, J. Appeal from a judgment of the County Court of Albany County (Harris, J.), *897rendered February 3, 1987, upon a verdict convicting defendant of the crimes of criminal sale of a controlled substance in the third degree (three counts), criminal injection of a narcotic drug and attempted criminal injection of a narcotic drug.
Both defendant and his companion, codefendant Alfred Drew, were charged with several crimes as the result of their activities on February 28, 1986 and March 1, 1986 at the apartment of Lisa Jackson in the City of Albany.* Following a trial, defendant and Drew were convicted of three counts of criminal sale of a controlled substance in the third degree, one count of criminal injection of a narcotic drug and one count of attempted criminal injection of a narcotic drug. Defendant now appeals claiming, inter alia, that there was insufficient evidence to sustain his conviction for the alleged sale to Wallace Toliver and that Jeffrey Melber was not competent to render an opinion regarding the identity of the substance. Finding defendant’s arguments meritless, we affirm.
We turn first to defendant’s contention that his conviction for criminal sale of a controlled substance to Toliver is unsupported by the record. We recognize that mere presence at the scene of a crime, without more, is insufficient to establish the guilt of the observer as an accessory to the crime (see, People v Padilla, 146 AD2d 813, 814, lv denied 74 NY2d 667) and, thus, there is no liability where there is no community of purpose (see, People v La Belle, 18 NY2d 405, 412). Here, Melber testified that Drew and defendant both stated that the heroin was very good and both remarked that they wanted to give Raymond Leigh two bags to test, evidencing defendant’s involvement with the substance alleged to be heroin and its subsequent sale to Toliver. Thus, the jury could reasonably infer from the testimony that defendant had the requisite mental culpability and complicity in the crime (see, People v Gemmill, 146 AD2d 951, 952). Viewing the evidence in the light most favorable to the People, as we must (see, People v Contes, 60 NY2d 620, 621), we find it legally sufficient to support the conviction.
We also find that County Court correctly permitted Melber to testify regarding the identity of the substance. In situations where the illegal substance is not available for analysis, drug users who can demonstrate a knowledge of the narcotic are competent to testify. It is for the jury to determine the weight to be given the testimony (People v Lynch, 85 AD2d 126, 128-*898129; see, People v Jewsbury, 115 AD2d 341, 343; People v Pierce, 112 AD2d 527, 528; cf., People v Kenny, 30 NY2d 154, 157). Melber testified that he had both injected and snorted heroin in the past, that he had taken other substances by injection and that the feeling produced by the substance in question was similar to that of heroin and was different from that of other substances. Thus, he was competent to render an opinion regarding the identity of the substance.
Defendant’s remaining arguments have been examined and have been found to be without merit.
Judgment affirmed. Mahoney, P. J., Kane, Mikoll, Mercure and Harvey, JJ., concur.
A detailed statement of the facts in this case may be found in our decision in People v Drew (160 AD2d 1100).