@xiangli-cmu I think the separate function is overkill. You can just change this all to:

```go
p.server.send(&AppendEntriesResponse{Term:resp.Term, Success:resp.Success, append:(resp.Term == p.server.currentTerm)})

```