changed int to uint64 to allow for a greater number of permutations