pass only the rootDir around instead of the whole pride