A simple algorithm for QCD jets