continued working on indexJ - it's not correct yet.