update sample code

Update sample code.