updating prime number finder, removing excess code for base cases