corrected the comment for function has_path()