WordBreakII code simplified