resolve ties with random