adding some console logs to get more insight