refactor using s3store