Fixed missing method in SampleCode