removed compiler warnings from unitialized variables and added support for openMP