Definition of beta function added