seems to work for slices and arrays as well