update demo to show various ways to use the lib