refactoring of pqe