added some console.logs in