Hamming Distance Improvement

It's been running on my computer for about 5 minutes, which means that it has no possible flaws