added template codes