Feature/state transition machine

Hmm, @xphere just alert me about the name of this method, and it is so difficult. `transition()` seems better than `makeTransition()`