improve templates a bit