change console.log to alert