Added json logic