use pathname class