Implementing reduceLargestComponent, not yet finished