added do_get_server_state function