new gcc_phat function