Updated sample code to reflect changes.