implemented hearbeat messages