add a proper constructor for S3 objects