Collect method implementation.