minor/cosmetic BUG, if we count starting from 0, the max is (len(data) - 1)