Fix example in README

Updated example to fix some syntax errors and updated to be a working example.