removed alert call and replaced it with console.log