cleaning up the code from veeru edits and getting checks to work