make hamming conform to official definition

Closes #25