updated a demo program