add the billing function