add greater and lesser functions