automated template parsing added