factor out squashing functions from unflexible enum