Added console.log for debug purposes