added converting to json