added tests
added template tests