A working program for returning prime numbers