determine grade method