reimplemented heatbeat detection