template as first class