initial import of CTM code