split the function into four steps: resource planning, estimation, budgeting and control. They are mostly sequential, but it's possible that some resource changes happen midway through the project, forcing the budgets to be adjusted.
I hope this helps :)