making index_collection_pids more efficient