Update Readme example code

i tried to create a small test app, but the code in the current readme is out of date so I updated the Readme example code to reflect the most recent changes.