added some code to prime1.cpp