refactor pallet 2x