Added bad input recognition feature