state manager and base state class