Added beta calculation.