OAK-1561 initial implementaion for range queries