checking function added
alerts removed and error text showing