basic branch and bound