and implemented real permuted index!