prepare to send to server