change console.logs to alerts