first template parsing methods