Finite descent obstruction on curves and modularity