  We show that the results we had obtained on diagonals of nine and ten
parameters families of rational functions using creative telescoping, yielding
modular forms expressed as pullbacked $ _2F_1$ hypergeometric functions, can be
obtained, much more efficiently, calculating the $ j$-invariant of an elliptic
curve canonically associated with the denominator of the rational functions. In
the case where creative telescoping yields pullbacked $ _2F_1$ hypergeometric
functions, we generalize this result to other families of rational functions in
three, and even more than three, variables. We also generalise this result to
rational functions in more than three variables when the denominator can be
associated to an algebraic variety corresponding to products of elliptic
curves, foliation in elliptic curves. We also extend these results to rational
functions in three variables when the denominator is associated with a {\em
genus-two curve such that its Jacobian is a split Jacobian} corresponding to
the product of two elliptic curves. We sketch the situation where the
denominator of the rational function is associated with algebraic varieties
that are not of the general type, having an infinite set of birational
automorphisms. We finally provide some examples of rational functions in more
than three variables, where the telescopers have pullbacked $ _2F_1$
hypergeometric solutions, the denominator corresponding to an algebraic variety
being not simply foliated in elliptic curves, but having a selected elliptic
curve in the variety explaining the pullbacked $ _2F_1$ hypergeometric
solution.
