query to state machine