index before optmization phase 2