properly handled nested array