add method to wait for server status to change to desired state