added handlers for append entries, program typechecks and if any RPC req or response has T > currentTerm i update it