basic prime numbers implementation