commandline working

- better iterator
- testcode