add path sum (bug) and rotate image