You don't need to pass algo the classes, you can obtain them from the objects