first arguments of a state handler is the state object