demo code finished