many changes, fixed isPrime, hashing works correctly for linear probing