trying to make directory deletion more effcient