fix higher dimensional array innerproducts
add TODO comments