Cognitive therapy of substance abuse