patch example in README to work with new API