handcoded cmm