modify hamming and mahatton function and findbugs errors