changed openMP design b/c writing to shared output array is very slow