added optional path argument if not using root