update minimum path sum