its writing to the object, but has errors