Added alert messages. I am done until I find if I am doing the anonymous function properly