refactored datamodel and packing