Ported new code to python3
GCO works even if n_iter is not provided