Exposing determine_path function