Update collect.cpp