move retain to onEnter