added path management that hopefully works