added gpa function