changed how results are generated, still not efficient enough. added prime logic