start implementing state machine for actions