Add states machine