added template stuff