make tmpdir a variable