standardize message parsing