updated sample to better reflect real world use