misc changes
state_machine added on resource model