solved issue #5 NoSuchElementException