ctyps generation was extracted as separate functor