refactor pallet 5x