rewrite of datamodel