Added State Machinery