rework dir struct