added some code for billing