server and client can connect to each other now,but full of bugs too