create functions for generating JSON #2
create functions for generating JSON 3.2.2014