panic done (not tested) and heartbeat added a bit