refactor code into showMultipart.