Added batch querying.