make the SLIM message length encoding variable

make the SLIM message length encoding variable (instead of hard-coded 6 digits)