added expiration parameter so heartbeat can be set to expire after certain time period