I have been at this for a day, it works, matches the initial criteria, however the error I keep getting is that I've mixed up the input order. I rectified this by using a LinkedHashmap and cloning it back to the originally declared HashMap variable. I know it needs to read the pairs into this HashMap table directly, however it changes the order from order of user input, to order by String Hash key value. I know why it's failing, I just don't know how to resolve it. Any pointers would be appreciated