first part of kidsroom state machine