modified printprime to look nicer and use a function