refactored some variable names
json template is an external file