make it work

no change for fucntion, but adjust a little code to make Apps
complile&run successfully.