updated digit classifier to work on single perceptrons