added a "state-machine"-like order processing model