fix budgets bug and add planing test