updated examples to conform to new generated API