Adding check to see if there is anything to be done