Path Builder function