implemented server's send and some corrections