dichotomy

add dichotomy method