pass rspec tests and deserialize method