added serializing for memorysocketbackend