simplify message parsing