fix example code to match interface
Merge pull request #23 from wyc/master

fix example code to match interface