beginning to add socket code into server side