added conversion to json