added batch quering