heart beat handling