added basic pg, ugly but a start