added open_socket