Added change to make the message length configurable