added alert error messageing