Changed console.log to alert