adjusted the struction of the Dir