error message should be improved