adding back in chdir