correction

change line, now the command return the title
remove the last item in the ArrayList after the while, so we didn't have
to take one useless loop and the item is no reuse by the next key