Adding heart beat functionality