pass test refactored tail