implementation of greater than functionality