Added grade criteria, rewritten for easier appliance