Add alert library

Add implementation of grading method.