added hamming function handle