adding beta calculation