added example code to docs