polish the upload part