rarest piece algorithm, for some reason its getting stuck once it handles the piece at index 434