fixed updating term stuff and did part of heartbeats in leader transition