implement Parser and Template classes