refactor implementation of subsumption