fix sample code