sorting msgs, msg align, network state