some maintenance and functionality added for automating grade emails