Even if you are guilty and have no legal defense, a skilled lawyer may be able to present mitigating factors to the judge or prosecutor and get a more favorable sentence or plea agreement. For example, your lawyer may convince the judge to give you probation or house arrest instead of jail time, or convince the prosecutor to drop or reduce some of your charges. Also, there are some cases where a defendant is factually guilty, but the police violated the defendant's constitutional rights. In some cases, an attorney may be able to get the charges dismissed if the police violated a suspect's constitutional rights. If you are charged with any type of offense, you should consult an attorney to see what an attorney can do for you in your criminal case.