Replacing == with >= and <=