Refactored the adjust_allocations() method for Tableau