update gist demo code