Adding a size function and a related hamming distance function.