add const for stm.currentState