You need an attorney who understands criminal law so that the search can be contested if it's not a lawful search. If it was not legal, then your case could be thrown out since the evidence would get suppressed. The range of punishment for a class B misdemeanor is up to 180 days in jail and/or up to a $2,000 fine plus costs of court. Other options include probation with a conviction and without a conviction (deferred adjudication). Maybe counties have drug court programs and pretrial diversion programs available for first time marijuana cases, too.