List to ListBuffer in getPrimes