modification has_mass filtering is now error-tolerant
using sets to be more accurate