changed formula for beta