implement sending heartbeat