Implement function callbacks for item matching.