basic trainer and recognizer