converted more functions to multidim