some demo code by sth c