moving working demo code