logging and code cosmetics