added alert for invalid user input