root is a better name, added support for a cwd variable