added greater function