removed obsolete write_intermediate_results function