big change in write_consensus