alert replaced with console.log