insert submessage size array into template