simplifying the generic method