started to refactor for theory tests