optimize List iteration using elementAt() for #312