add more tests and refactor the Upload to S3Upload