most of twoD, including range indexing