profile test refactoring