finished Problem 4
Path adjustment