Not sure what is wrong with this modified code - this checks for equal conditions as well!