
740 P.2d 679 (1987)
STATE of Montana, Plaintiff and Respondent,
v.
Bradley Keith CLAUSEN, Defendant and Appellant.
No. 86-393.
Supreme Court of Montana.
August 5, 1987.
*680 E. June Lord, Great Falls, for defendant and appellant.
Mike Greely, Atty. Gen., Joe R. Roberts, Asst. Atty. Gen., Helena, Patrick L. Paul, Cascade Co. Atty., Great Falls, for plaintiff and respondent.
GULBRANDSON, Justice.
Bradley Keith Clausen appeals his conviction in Cascade County District Court for possession of dangerous drugs with intent to sell, a felony, and possession of dangerous drugs, a felony. He was also designated a persistent felony offender.
The issues on appeal are:
(1) Whether the District Court erred in allowing into evidence Clausen's prior conviction for selling two grams of cocaine.
(2) Whether Clausen had standing to challenge the search of the storage shed in which the illegal drugs were discovered.
We affirm.
Clausen and his wife separated in late May or early June 1985. The wife thereafter filed a petition for dissolution of marriage and obtained a court order in June 1985 directing the sheriff to take and return to the wife certain items of marital property that Mr. Clausen was concealing from his wife. The order included a provision for taking property from any third party acting as Clausen's agent. The sheriff was informed that some of the marital property had been moved to a storage shed listed under the name of Clausen's friend, Michael Brown. Brown freely admitted renting the space after receiving rental funds from Clausen. Brown also admitted taking the storage keys to Clausen after executing the rental agreement. Brown denies having helped Clausen move property to the shed or visiting the shed subsequent to making the rental agreement. The owner of the storage shed opened the shed for the sheriff and Clausen's wife. Shortly after beginning the removal of marital property as listed in the court order the wife discovered a garbage bag filled with marijuana. Further investigation revealed a total of 37.6 pounds of marijuana, five grams of psilocybin, magic mushrooms, two scales used to weigh the drugs and ZigZag cigarette papers. The storage manager testified that after the sheriff and the wife left the premises, two unidentified men requested keys to the shed but their request was denied. The manager reported that he did not recognize the two men but that they seemed a little upset. Defendant testified at trial that he sold some of the property in the shed and gave or sold the storage keys to a Mexican native on June 2, 1985, shortly before the drug seizure took place. Despite the issuance of a subpoena, this person was never located. Before trial, Clausen dismissed his counsel and was appointed new counsel.
The jury convicted Clausen of criminal possession of dangerous drugs with intent to sell, a felony, and criminal possession of dangerous drugs, a felony. The District Court noted in its findings that Clausen's employment record indicated that his income over the last several years was not from legitimate employment and that incarceration was necessary to get Clausen out of drug trafficking. We note that Clausen was convicted in federal court in 1982 for the criminal sale of dangerous drugs, namely cocaine. The court sentenced Clausen to two five-year sentences for the offenses of which he was convicted and a third five-year sentence for being a persistent felony offender. The court ordered the sentences to run consecutively.
*681 The first issue is whether the District Court erred in allowing into evidence Clausen's prior conviction for selling two grams of cocaine. Rule 404(b), M.R.Evid., states:
(b) Other crimes, wrongs, acts. Evidence of other crimes, wrongs, or acts is not admissible to prove the character of a person in order to show that he acted in conformity therewith. It may, however, be admissible for other purposes, such as proof of motive, opportunity, intent, preparation, plan, knowledge, identity, or absence of mistake or accident.
In determining whether evidence of "other crimes or acts" should be admitted, inquiry should be made into four areas as enunciated in State v. Just (1979), 184 Mont. 262, 269, 602 P.2d 957, 961:
1. similarity of crimes or acts;
2. nearness in time;
3. tendency to establish a common scheme, plan or system; and
4. the probative value of the evidence is not substantially outweighed by the prejudice to the defendant.
In State v. T.W. (Mont. 1986), 715 P.2d 428, 430, 43 St.Rep. 368, 371, we said that "[f]ailure of questioned evidence to meet only one element of the Just test is not sufficient to refuse its admission ..." and that "the four factors must be considered together." We note that the State filed notice in this case that it would introduce Clausen's prior conviction in federal court as evidence.
Applying the Just case to the facts before us, we see that both cases involve the criminal offense of selling dangerous drugs. In the federal case, Clausen was convicted of selling two grams of cocaine, while here Clausen was convicted of possessing 37.6 pounds of marijuana with intent to sell and possessing five grams of psilocybin. The fact that the type of drugs and the quantities involved are different is irrelevant. What is important is the substantial similarity of Clausen's actions which goes to the issue of his intent under Rule 404(b), M.R.Evid.
As to the nearness in time factor, we note that Clausen was released on parole from federal prison in June 1984 and allegedly committed the offenses herein on June 9, 1985. Since the crimes were committed just over a year from when Clausen was released from prison, we believe that sufficient nearness in time has been proven.
The third factor in Just is the tendency to establish a common scheme, plan, or system. A similarity does exist between the federal conviction and the case here which goes to the issue of intent under Rule 404(b): the sale of illegal drugs. We therefore believe that the third factor of Just has been met.
The final factor in Just is whether the probative value of the evidence outweighs its prejudicial effect to the defendant. Being that the federal offense and the one here are quite similar, i.e., the sale of illegal or dangerous drugs, we believe the probative value of the evidence is sufficient in strength to overcome the prejudicial effect to the defendant. Our reasoning is that the lower court followed the procedure for protecting the defendant's interests when evidence of "other crimes or acts" is to be introduced. The requirements are, as discussed in Just, 602 P.2d at 963-964, (1) notice should be given before trial of the State's intention to introduce evidence of other crimes; (2) at the time of introduction, the trial judge should give a special instruction to the jury advising them that the evidence is being submitted for the limited purposes allowed in Rule 404(b); and (3) the same instruction should be included in the full instructions given to the jury at the close of the case.
Our review of the record reveals that the prosecutor and District Judge followed the above requirements. We conclude that since Clausen denied knowledge of the illegal drugs at the storage shed, the prior conviction in federal court was admissible in respect to the issue of intent under Rule 404(b), M.R.Evid.
The second issue is whether Clausen had standing to challenge the search of the storage shed in which the illegal drugs were discovered. Clausen argues that he had a legitimate expectation of privacy in the shed while at the same time he disclaims any interest in the shed's contents by virtue of the fact that he allegedly sold *682 the keys and the shed's contents to a Mexican native. We fail to see an issue of standing before us. The facts are that Clausen and his wife were involved in a marital property dispute at the time of Clausen's arrest. Clausen admitted taking marital assets without his wife's consent or a court order and selling some or most of those assets. The wife obtained a court order directing the sheriff to find and return the marital assets as listed in the order. In addition, there was clear evidence that Clausen was renting storage space under his friend's cover. The sheriff obtained valid entry to the shed and in the course of retrieving the marital property, the illegal drugs were discovered. The court correctly characterized the process:
THE COURT: This search was conducted in compliance with lawful Court Order. It wasn't a search for any contraband or any illegally possessed property. It was in compliance with the Order of  a lawful Order of the Court to secure marital property.
We conclude that the search was proper.
Affirmed.
TURNAGE, C.J., and SHEEHY, HUNT and McDONOUGH, JJ., concur.
