fixed openmp issues with core, added unit test