add app code and demo code