Thoughts which create evil actions are much worse than the acts themselves. You can stop doing a bad thing, and repent, and not repeat it. But bad thoughts are repeated again and again, and cause other bad actions; bad thoughts follow one after another.