change alert to console.log