move transitionToView to where it belong