adding template code