path linear solution