modified client and server scripts