An inclusive and exclusive algorithm for QED evolution