added rootPath option