optimizing msgs