make index input an integer instead of a little-endian byte sequence