convert length to string before sending