start of nested array method (flatten)