Making corrections to place and call of the json create function