changed the way the INDEX operator is evaluated to better