init work on termplate function pregeneration