made PHI_ORDER into and int