added a goal state test to the _displayState()_ algorithm