Added Query on Range and tests