squash: refactoring