added heartbeat test
added append entries logic to follower and candidate