adding hamming distance and Hans' unit test. added breaks to the
crossover switch