working on template system