Wrapper for hamming functions