Update to classification algorithm