updated sample to work with public api v3