Updated the stupid revision() function with a logical system