optimized and updated templates