generalize types