Changed alert() to console.log()