fixed test. moved class variables into instance