refactoring of s3 layout for discussion