basic templte parsing