moore prime numbers functionality