resource data struct refactoring2