implemented sample.