implement greater and less than