optimized a uniform-time-warping function