add states machine class