updated: cleaned up logging.