added addBytes
merged and fixed deserialize