document objects and arrays handling