Adding support for varible-size payloads