template compiler finished and tested
finished template expansion implementation