tweaking getPrimes to properly return the primes upto the number
fixing getSetByMax to properly terminate on the end function and not return the last value