adding queries in chunks