changed collectVideo to collect function