changed unit test to use instance variables