reworked logging