added elemIndex