implementing  dir structure