removed the puts data and heartbeat variable