rootdir refactor