update README example

update the example in the README so that it matches the current API