fix prime algo, refactor prob3, finish prob10