refactor server and client
initial commit