more refactoring to get rid of those ghetto loops to reconstruct message