added whereToRevert and modified domination to return 0 values
Make the changes mentioned in the TODO