decode multipart messages