fixed up prime range calculation and prime algo. moved defines