simple hyperloglog implementation