echo test refactored