added cwd buffer (work in progress)