little more work on template parsing