updated for better templates