complete test refactor