Updated give all grades function