added more tests for template handling