Update pathSum