fixed the format of the json sent