make @directory an array