added getter function and changed some code logic to allow better manipulation of paths