Added simple PG function.