checking for reverting the changes