onEnter() and onExit() siganature corrected and comments corrected