template system done