change alert to console.warn