refactored implementation of subsumption