improved updateS3