implementing template engine
added test cases for template engine