working on connection to server