need to check in encodeMultipart to accomodate arrays that have had functions added to their prototype