refactor the dir structure