added heartbeat feature