Added a recursive sequencing algorithm