fix: randomly generate from total count-1