implemented binary search for beta, now it is clear that this won't work because the function does not cross zero...