fixing s3 implementation