removing dependency on tempfiles