Almost there... hash function gen is broken and isPrime isnt implmented