major test refactoring