prime number tesk implementation