tried to put in loop in set request to wait for election