Some gen algos