Add insert_path function