Finalized budget function