demo code final update