Updating examples to updated API