Integer math is faster.
Avoiding duplicates the proper way.