added enter and exit functions on training too