fixing bug in choose-primes
fixing bug in generate-matrices