add function to track cwd w/ proc
bit of reorg
update w/ merge resolution