adding input validation to classfication.py