refactor sequence merging method to simplify testing
add test for out of order merging