started switch to state manager architecture