Changed isGreater function implementation.