adding generic template and update code to set template in the correct location