global variables added, Date fully functional and displaying alert