rewrite ``indexin`` function according to @timholy and using comprehension

rename to indexin

rename to indexin