Add region swapOut, beforeSwapOut

fixes #1718
booo