attempt to slightly optimize heartbeat