add exceptions for deserialization + tests