switched template lib