state transition method