As with the last algorithm, you should really look at the code for getBMSkip() in BM.java for the full treatment.