added discard feature to s3