added template code