improve templates