Added console.log debug statements