update second trial of minimum-path-sum