Opinion by
Hoeeman, J.,Appellant contends that the evidence presented at trial is insufficient to sustain his convictions for pos*238session of narcotic drugs, possession of dangerous drugs and sale of dangerous drugs.
On February 29, 1972, Officer Wesley Servance of the Philadelphia Police Department went to the premises at 2236 N. 18th Street with a search warrant. The building at this address consists of two stories, each containing a separate apartment. According to the testimony of Officer Servance, he rang the door bell to the second floor apartment. He testified that while he was waiting for a response, four youths joined him. At that point, Ersldne Thomas, appellant’s co-defendant at trial, answered the door and spoke with the four youths. Thomas agreed to meet the boys at a later time. Thomas then asked Officer Servance if he had the money and the officer answered affirmatively. Thomas went upstairs and returned with two green pills. Officer Servance handed Thomas a ten-dollar bill, and Mr. Thomas again entered the apartment in order to get change. When Thomas returned, Officer Servance identified himself and presented the search warrant. Thomas attempted to shut the door and prevent Servance from entering.
Officer Berry had been waiting outside during Officer Servance’s conversation with Thomas. After observing Officer Servance struggle with Thomas and hearing Thomas yell to “Billy” to “get rid of the stuff,” he forced the door open and ran upstairs. Officer Berry testified that he stopped appellant as he was entering the kitchen. A search of the kitchen revealed drugs contained inside a coffeepot which had a plastic container over it.
When testing the sufficiency of the evidence, we must review the testimony in the light most favorable to the verdict winner, Commonwealth v. Blevins, 453 Pa. 481, 309 A. 2d 421 (1973), and must accept as true all of the evidence, direct or circumstantial, and all reasonable inferences arising from the evidence, *239upon which the trier of facts could properly have based the verdict. Commonwealth v. Fortune, 456 Pa. 365, 318 A. 2d 327 (1974). When viewed in this posture, the evidence was sufficient to establish appellant’s guilt on the charges of possession, but not on the charge of illegal sale.
Since no drugs were found on appellant’s person, the Commonwealth had to prove joint constructive possession. Two elements are essential to such a finding: the power of control and the intent to exercise that control. Commonwealth v. Townsend, 428 Pa. 281, 237 A. 2d 192 (1968). Although it was never conclusively shown that appellant was a resident of the apartment, power of control can be inferred from the fact that he and the co-defendant were the only two people present during the arrests and subsequent search. While presence in the vicinity of illegal drugs by itself does not prove the crime of possession, Commonwealth v. Tirpak, 441 Pa. 534, 272 A. 2d 476 (1971), knowledge of the presence of contraband and intent to exercise control can be inferred from the totality of the circumstances, of which presence is a factor. Commonwealth v. Fortune, supra. In this case, the police officer stopped the appellant just as he was about to enter the room in which the illegal drugs were found. This occurred immediately after appellant’s co-defendant had shouted to “get rid of the stuff.” Since the contraband was hidden in that room it is reasonable to infer that appellant was aware of its existence and was obeying the instruction of his co-defendant to destroy the evidence. Under the totality of the circumstances, therefore, the trier of fact was justified in finding appellant guilty of possession of illegal drugs.
Appellant was also convicted for the sale of dangerous drugs. Despite the fact that appellant was in possession of dangerous drugs, his conviction for sale must be reversed. It is clear from the record that *240appellant played no role in Thomas’s illegal sale to Officer Servance: appellant remained in the upstairs apartment throughout the entire transaction. The Commonwealth has produced no evidence whatsoever which can serve to link appellant with the sale of drugs by his co-defendant. There was no proof that appellant was aware that Thomas was making a sale, let alone that appellant intended to facilitate that criminal activity. “Our case law sets out that an accomplice is one who ‘knowingly and voluntarily cooperates with or aids another in the commission of a crime’. . . . He is not a passive bystander who happens to come upon an illegal activity but does not participate in same .... Rather, he must with the requisite knowledge and intent join in facilitating the criminal activity.” Commonwealth v. Jones, 213 Pa. Superior Ct. 504, 508, 247 A. 2d 624 (1968). See also, Commonwealth v. Wilson, 449 Pa. 235, 296 A. 2d 719 (1972).
The judgments of sentence on the possession convictions are affirmed; the judgment of sentence on the sale conviction is reversed, conviction vacated, and appellant ordered discharged.1
While we affirm the possession convictions, we must remand to the court below for sentencing consistent with our opinion in Commonwealth v. Lookhart, 223 Pa. Superior Ct. 60, 296 A. 2d 883 (1972).