Update example in README for new API