add cm sample code