changed printing statements to logging.  Closes #2.