updated datamodel, fixed bugs