change pathname to pathName