epsilon is adjustable and added a trainingmode option