refactoring...
added some io crap that should not be t here
refactoring...