bisect: move common bisect functionality to "bisect_common"