added training mode