updated tests and logging.