- fixed the iterator
- added the java main