copy collection before working on it