made messageoverhead function _slightly_ more accurate