properly get path name with params