adding template system