added templates and stuff