add option to pass in root dir