most client connection stuff _working_