moved to c for coolness' sake, omp version is working. consider moving to bitwise storage of final array