switch template working