clean pgUtils and change where it is used