changes alert to console.log