Update samplecode