refactoring data model, external template