A new method for combining NLO QCD with shower Monte Carlo algorithms