solved problems 58-59, made prime gen 2x faster