mergesort insted of selection sort, remove the hamming distance check, and some unused functions