basic find prime number functionality