adding in support for offset indices