moved templates to an inheritance system