updated once more, and ran on 8-core box for better performance under OpenMP