adds sending of heartbeat