add Algorithm class and modify FaceRecognizer to inherit it