add example

I added an example for 2 different ways to use the library. I found it a little difficult to figure out, so this may help someone else.