adding s3 functionality