added functionality to create new object and state and add state to the object via the commandcontroller class with tests