sequencing algorithm basics