fix pfg adapter an refactoring