added heartbeat sending