Modified the range filter to enforce the correct syntax and implement it more accurately