A Trowbridge man who was dealing in a former legal high to fund his cannabis habit has been spared an immediate jail term.
Kamil Lebida, 26, was caught with thousands of pounds worth of mephedrone when police went to his home making inquiries about a car.
And as well as the drugs he also had a set of scales and numerous small self seal plastic bags used for storing drugs.
But after hearing that Lebida had almost always been in work since coming to the country three or four years ago a judge imposed a suspended sentence.
Colin Meeke, prosecuting, told Swindon Crown Court on Friday that police went to his house at 3.30pm on October 21 last year.
As well as the mephedrone, worth up to £2,000 and some in street deals, and paraphernalia they also found smaller quantities of cannabis and amphetamines.
When he was questioned he denied he was a dealer saying he found the drugs in a bucket.
Lebida, of Conigre Square, pleaded guilty to possessing a class B drug with intent to supply and two of simple possession.
Matthew Scott, defending, said he had worked almost constantly since coming into the country and was about to start at a mattress factory.
"Sadly he had been tempted on this occasion to deal a relatively small quantity of drugs to fund his own cannabis habit," he said.
Passing sentence Judge Tim Mousley QC said: "You are 26 years old and you have a previous conviction for possessing cannabis.
"I have read what is said in the pre-sentence report about you and it is clear that you are normally a hardworking member of the community.
"For all these reasons I have taken the view that the prison sentence can be suspended."
He imposed an eight-month jail term suspended for two years with supervision for a year and 200 hours of unpaid work.