reduced the number of temporary files generated