get rid of getcwd/chdir