working on automatic restart of PEagent