Added preTemplate