java version working over twice as fast. c version is 1 second faster. moving on to windows version and will come back and modifty unix c version.