test refactored