functional Template Engine