updated client, refactored server