able part of the crime charged, State v. Jordan, 79 Wn.2d 480, 487 P.2d 617 (1971); State v. Robinson, 4 Wn. App. 515, 483 P.2d 144 (1971), or to impeach a defendant’s character when he had made it an issue, State v. Gregory, 79 Wn.2d 637, 488 P.2d 757 (1971), or to demonstrate a defendant’s “consciousness of guilt” and thereby establish his identity, State v. Messinger, 8 Wn. App. 829, 509 P.2d 382 (1973).
The true test of admissibility, however, is twofold: (1) The evidence of other offenses sought to be admitted must be relevant and necessary to prove an essential element of the crime charged, that is, as the court stated in Messinger at page 837, “[T]here must be a logical relationship between the . . . misconduct and the question of defendant’s guilt,” and (2) the relevance and necessity of the evidence must not be outweighed by its prejudice to the defendant because as was stated in State v. Golladay, 78 Wn.2d 121, 143, 470 P.2d 191 (1970), “[Ejvidence, however competent, is rarely admissible when its relevancy is entirely engulfed by the prejudice which it may engender.” Thus, it has been held to be reversible error for a trial court to admit evidence of an abortion performed by the defendant some 3 months after the abortion offense charged, State v. Folsom, supra; or to allow testimony concerning defendant’s participation in an alleged burglary during a narcotics prosecution, State v. Dinges, 48 Wn.2d 152, 292 P.2d 361 (1956); or to permit a police officer to testify concerning the alleged plan of the defendants to commit a robbery similar to the one with which they were charged, State v. Miles, supra; or to allow the state to devote 40 percent of its evidence to establishing defendant’s possession of marijuana and amphetamines in a prosecution for possession of LSD, State v. Portrey, 6 Wn. App. 380, 492 P.2d 1050 (1972).
In applying the foregoing principles to the case at bar, we note that the record indicates that the trial judge allowed all of the testimony here in question on the basis of