complete bisect, and still some bugs