path: implementing solver()