Need to modularise and multithread using MPI and openMP