use writeClassAndObject directly on the underlying array