refactored raw response deserialization