added constant to turn query ranges on or off