Change StateObject to IStateObject