initial codes for csm