added template system