making prime.py self-contained