Cognitive-behavioral treatment to prevent offending and to rehabilitate offenders