tested workin version
collection to arr2d