added template tests and json