More functions to primeLib