clear code and change input format on sendrecv