Merge different classes in onlineAccuracy method