refactor multipart