Finished up the collect function.