implemented regionQuery