added lots of logging messages