manage heartbeat