Function canTransition