refact the directory