fixed so that no_barrier.c also keeps track on which index the element was found