decouple comparison from subtypes