moved alert out of the form