Given a second order linear differential equations with coefficients in a field k = C(x), the Kovacic algorithm finds all Liouvillian solutions, that is, solutions that one can write in terms of exponentials, logarithms, integration symbols, algebraic extensions, and combinations thereof. A theorem of Klein states that, in the most interesting cases of the Kovacic algorithm (i.e when the projective differential Galois group is finite), the differential equation must be a pullback (a change of variable) of a standard hypergeometric equation. This provides a way to represent solutions of the differential equation in a more compact way than the format provided by the Kovacic algorithm. Formulas to make Klein's theorem effective were given in [4,2,3]. In this paper we will give a simple algorithm based on such formulas. To make the algorithm more easy to implement for various differential fields k, we will give a variation on the earlier formulas, namely we will base the formulas on invariants of the differential Galois group instead of semi-invariants.