fix data structure to be sent