use a look-up table to find the beta and the optimal beta