mistake a lot on index array