modefied pot_psen_manager.cpp