added IsValidSize for msgs