Switch examples to new API.