made templates more robust