adjusted path function