reorder type variables