added debug console.log