refactored range filters and improved test