added support for pg