change annoying alert to console.log