added sleep() and added the one-liner to state_equals_state