converted to nested arrays