Fixed example to match API changes