factor out datamodel class