template switch added