optimised the code; runs a factor of 6 faster now
changed several things; performance enhanced.
changed logging (by hand now).