update average grade code, update average grade test