add partial path sum