improved heartbeat mode