implemeted real permuted index!