trying to make it work

Stopped compiling.
What you've missed here is that readString() has already gone though everything - the 
 elements have already been read, and you've gone past them. You'll need to modify readString() -- this is why I told you to read though the file and add comments where you'll need to make changes!!! I could have told you that weeks ago.
The immediate question you need to answer is *how* you need to modify it, and *when* you need to use the modified version.