renamed changeTemplate to setTemplate