refactor to s3intf and s3srv