converted to json maybe it will be simpler