added tests for range queries