change default root folder, code refactor