cleaned logging
hi
fixed a fundamental flaw