renamed index checks to be more precise since alternative user implementations may work differently from how the function names describe them working.