moved two utility functions into mpiutils