refector
change demo code