use objects instead of arrays for api communications