code clean up. greater-than function added.