added some console logs