added max and less than