tried to implement state machine in matchfoundactivity