removed unneeded template parsing loop