added data packing and basic storing