replaced deprecated console.debug with console.log