dirs refractored