changed last line of console.log into alert instead