heartbeat function looked to be misnamed