finished time_warping for SRSF using DP