added function for error handling : when values were sent but no results
were received a alert warns the user, may not be the best approach.