comments for server and client, removed unnecessary code