syncing from sixdimensionalarray to get fbartels' fixes