* modified testing code - needs to change to an actual unit test without adding states as in the main program