modifying prime finder to fix errors found by tests
refactoring code remove some list adds