Update the example as per the new API.