Added in connect to server function