A construction of thec<1 modular invariant partition functions