state machine tested. some more additions