Updated sample code

Changed the sample code to match the updates