but in general it works something like this:
1. define threshold
2. has a candidate passed the threshold?,
if yes, they immediately pass, redistribute the excess votes, goto 1
3. eliminate the candidate with lowest votes and redistribute them
4. if all seats are filled, you're finished, else goto 1