Updated example to work with the V2 API