refactor generating to generators/prim.cpp