Updated value passing sample to use the new API.