path function.