Template of SingleMode and DoubleMode