finished updating demo code to modern library usage.