piman revert and switching added