Add source and target func.