control and state manager