modify dirname