Writting auto-budget functions