added template mechanics