Updated sample to match client code