don't use substraction for comparison if datatypes can overflow