adding code generator from templates