squash me - all tests pass, some refactoring is required