first pass at sorting linkedlist in createCommitmentTree