done translating index pairs to ranges taking newlines into account; started working on transformations