first two tests pass, refactored another