you must write results in binary format