I added some console.log debugging