add pub/sub pattern and renew demo