Recognizing handwritten digits using k-nearest neighbor