use pathname magic