complete the sample code