refactored statemachine getAcceptedTransition. #13