deserialization works, but is somewhat hacky