updated sample to use new media methods