added heartbeat and monitor