major revision of openMPhw3.c