replace console.log with alerts