removed temp files, added progress code.