GPA to HPA function modified