improved message formatting