tidy up logging.  extract method to fill in dep muck