updated checks in get_path in functions