adding template stuff in