extended functionality, added cwd, added extension