Added option to make msg size configurable