update example code to match recent function change
finish up tests