modify collect method