Update, fixed a bug in dichotomy