new functions.  remove logging.