simplify message calculation