added more log statements to better follow what's happening