fixed prime generation and tests another time. Still have to confirm times to be reduced.