fix typo
don't hardcode how many piles there are