special case 1d and 2d