Refactored slightly to extract 'greater than' logic