some code-rework and test-prints
some more code-rework after testing. ready to be moved to separate package