added population and hammingdist functions